-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
tygo.yaml
59 lines (56 loc) · 2.28 KB
/
tygo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This is a config file that typescriptifies the packages under the example folder.
# and some other packages.
packages:
- path: "github.com/gzuidhof/tygo/examples/bookstore"
type_mappings:
time.Time: "string /* RFC 3339 formatted */"
null.String: "string | null"
uuid.UUID: "string"
- path: "github.com/gzuidhof/tygo/examples/abstract"
indent: " "
exclude_files:
- "excluded.go"
frontmatter:
| # We can define some additional text to put at the start of the file.
export type Something = string | number;
- path: "github.com/gzuidhof/tygo/examples/simple"
fallback_type: unknown
- path: "github.com/gzuidhof/tygo/examples/inheritance"
fallback_type: unknown
frontmatter:
| # We can define some additional text to put at the start of the file.
import * as bookapp from "../bookstore"
- path: "github.com/gzuidhof/tygo/examples/embed"
fallback_type: unknown
type_mappings:
bookapp.Book: "bookapp.Book"
bookapp.Chapter: "bookapp.Chapter"
frontmatter:
| # We can define some additional text to put at the start of the file.
import * as bookapp from "../bookstore"
- path: "github.com/gzuidhof/tygo/examples/generic"
fallback_type: unknown
- path: "github.com/gzuidhof/tygo/examples/generic_any"
- path: "github.com/gzuidhof/tygo/examples/preserveTypeComments"
fallback_type: unknown
preserve_comments: "types"
- path: "github.com/gzuidhof/tygo/examples/noComments"
fallback_type: unknown
preserve_comments: "none"
# Generate the "net/http" output example, note the output is in gitignore as it's pretty big
- path: "net/http"
output_path: "./examples/http/index.ts"
type_mappings:
time.Duration: "number /* time in nanoseconds (time.Duration) */"
# Generate the "time" output example, note the output is in gitignore as it's pretty big
- path: "time"
output_path: "./examples/time/index.ts"
- path: "github.com/gzuidhof/tygo/examples/yaml"
output_path: "./examples/yaml/index.ts"
flavor: "yaml"
- path: "github.com/gzuidhof/tygo/examples/interface"
- path: "github.com/gzuidhof/tygo/examples/directive"
- path: "github.com/gzuidhof/tygo/examples/emit"
exclude_files:
- "excluded.go"
- path: "github.com/gzuidhof/tygo/examples/rune"