mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-17 01:19:29 +08:00
26 lines
791 B
Cheetah
26 lines
791 B
Cheetah
{{- $pkg := .Package}}{{- range .Imports}}
|
|
import * as {{.PackageName}} from "{{.Path}}/models";{{- end}}
|
|
{{- range $enumindex, $enumdef := .Enums}}
|
|
{{- range $commentindex, $commentdef := $enumdef.DocComments}}
|
|
{{$commentdef -}}
|
|
{{- end}}
|
|
export enum {{$enumdef.Name}} {
|
|
{{- range $constindex, $constdef := .Consts}}
|
|
{{- if $constdef.DocComments}}
|
|
{{- range $commentindex, $commentdef := $constdef.DocComments}}
|
|
{{$commentdef -}}
|
|
{{- end }}
|
|
{{- end}}
|
|
{{$constdef.Name}} = {{$constdef.Value}},{{end}}
|
|
}
|
|
{{- end}}
|
|
{{range $name, $def := .Models}}
|
|
{{- if $def.DocComments}}
|
|
{{- range $commentindex, $commentdef := $def.DocComments}}
|
|
{{$commentdef -}}
|
|
{{- end }}
|
|
{{- end}}
|
|
export interface {{$def.Name}} { {{- range $def.Fields}}
|
|
{{.JSDef $pkg}}{{end}}
|
|
}
|
|
{{end}} |