Files
wails/v2/pkg/parser/package.d.template
2020-11-11 21:27:40 +11:00

43 lines
1.1 KiB
Plaintext

// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
{{- range .Structs}}
{{- if .IsBound}}
export namespace {{.Name}} {
{{- range .Methods}}
{{- if .Comments }}
{{range .Comments}}
// {{ . }}{{end}}
{{- end}}
function {{.Name}}({{.InputsAsTSText $.Name}}): Promise<{{.OutputsAsTSDeclarationText $.Name}}>;
{{- end}}
}
{{- end}}
{{- if .IsUsedAsData}}
{{if .Comments }}
/**
{{range .Comments}} *{{ . }}{{end}}
*/
export type {{.Name}} = {
{{- range .Fields}}
{{- if not .Ignored}}
{{- if .Comments }}{{range .Comments}}
//{{ . }}{{end}}{{- end}}
{{ .AsTSDeclaration $.Name}}; {{- end}}
{{- end}}
};
/**
{{if .Comments }}{{range .Comments}} *{{ . }}{{end}}{{end}}
* @typedef {object} {{.Name}}
{{- range .Fields}}{{- if not .JSONOptions.Ignored }}
* @property {{"{"}}{{.TypeForPropertyDoc}}{{"}"}} {{.NameForPropertyDoc}} {{- if .Comments}} - {{- range .Comments}}{{ . }}{{- end}}{{- end}}{{- end}}
{{- end}}
*/
export var {{.Name}}: any;
{{- end}}
{{- end}}
{{- end}}