// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

interface Window {

    backend: {

        {{- range . }}{{$packageName:=.Name}}
        {{- if .HasBoundStructs }}
        {{ $packageName }}: {
            {{- range .Structs }}
            {{- if .IsBound }}
            {{if .Comments }}{{range .Comments}}// {{ . }}{{end}}{{end}}
            {{.Name}}: {
                {{range .Methods}}
                {{if .Comments }}{{range .Comments}}// {{ . }}{{end}}{{end}}
                {{.Name}}: ({{.InputsAsTSText $packageName}}) => Promise<{{.OutputsAsTSText $packageName}}>,
                {{end}}
            }
            {{- end}}
            {{- end}}
        }
        {{- end}}
        {{- end}}
    }
}