mirror of
https://github.com/taigrr/wails.git
synced 2026-04-17 04:05:12 -07:00
Support json tags in module generation
This commit is contained in:
@@ -1,24 +1,27 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
{{- if .DeclarationReferences }}
|
||||
{{range .DeclarationReferences}}
|
||||
const {{.}} = require('./_{{.}}');{{end}}{{- end}}
|
||||
|
||||
{{- range $struct := .Structs }}
|
||||
{{- if .IsUsedAsData }}
|
||||
|
||||
/**
|
||||
{{if .Comments }}{{range .Comments}} *{{ . }}{{end}}{{end}}
|
||||
* @typedef {object} {{.Name}}
|
||||
{{range .Fields}} * @property {{"{"}}{{.JSType}}{{"}"}} {{.Name}}
|
||||
{{- if .Comments}} - {{- range .Comments}}{{ . }}{{- end}}{{- end}}
|
||||
{{end}} *
|
||||
*/
|
||||
export const {{.Name}} = {
|
||||
{{- range .Fields}}
|
||||
{{.Name}},
|
||||
{{- range .Fields}}{{- if not .JSONOptions.Ignored }}
|
||||
* @property {{"{"}}{{.TypeForPropertyDoc}}{{"}"}} {{.NameForPropertyDoc}} {{- if .Comments}} - {{- range .Comments}}{{ . }}{{- end}}{{- end}}{{- end}}
|
||||
{{- end}}
|
||||
}
|
||||
*/
|
||||
export var {{.Name}};
|
||||
|
||||
{{- end}}
|
||||
{{- if .IsBound }}
|
||||
{{if .Methods }}
|
||||
{{- if .Methods }}
|
||||
|
||||
{{if .Comments }}{{range .Comments}}// {{ . }}{{end}}{{end}}
|
||||
export const {{.Name}} = {
|
||||
{{range .Methods }}
|
||||
@@ -35,9 +38,7 @@ export const {{.Name}} = {
|
||||
},
|
||||
{{end}}
|
||||
}
|
||||
{{end}}
|
||||
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user