1.1.8 • Published 2 years ago

treetype-ts v1.1.8

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

treetype-ts

Usage

This usage might not always be up-to-date, please check ttgen -h.

ttgen [flags...] <input> <interface> [additions...]

Flags

FlagDescription
-h, --helpShow help
-n, --notice <string>An optional comment to add to the output
-o, --output <string>Where to output the result, defaults to standard output
-r, --root <string>Custom name to use for the root namespace, it defaults to a kebab case version of <interface> prefixed by an @.

Additions

Additions specify if and how to merge interfaces into the main one, they are defined as follows:

<path>:<property>:<name>

Where <path> is the path on the main interface on which to set <property> to the value of the interface name <name>.
/ may be used as a substitute for the root namespace name.

Examples

ttgen src/def.d.ts VendettaObject -o output.d.ts
# Outputs definitions to the inferred module name '@vendeta-object'
ttgen src/def.d.ts VendettaObject -n 'Hello world!'
# Prepends '// Hello world' to the file
ttgen src/def.d.ts VendettaObject /:plugin:VendettaPluginObject -o output.d.ts
# Pretends that at path '/' a property called 'plugin' containing the props of an interface called VendettaPluginObject exists.
1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago