This package has been deprecated

Author message:

treetype-ts has been superceded by @uwu/treetype

treetype-ts

1.1.8 • Public • Published

treetype-ts

Usage

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

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

Flags

Flag Description
-h, --help Show 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.

Readme

Keywords

none

Package Sidebar

Install

npm i treetype-ts

Weekly Downloads

26

Version

1.1.8

License

BSD-3-Clause

Unpacked Size

11.2 kB

Total Files

6

Last publish

Collaborators

  • redstonekasi