Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decls ¶
Decls uses tsdecls.Write to write TypeScript type declarations to `outfile` based on the Go `typename` found in the package in `dir`.
Decls is implemented in terms of fab.Files. Any opts are passed through to that function.
It is JSON-encodable (and therefore usable as the subtarget in fab.Files).
A Decls target may be specified in YAML using the tag !ts.Decls, which introduces a mapping whose fields are:
- Dir: the directory containing a Go package
- Type: the Go type to examine for producing TypeScript declarations
- Prefix: the path prefix for the generated POST URL
- Out: the output file
- Autoclean: a boolean indicating whether the output file should be added to the "autoclean registry." See fab.Autoclean for more about this feature.
Both Dir and Out are either absolute or relative to the directory containing the YAML file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.