Skip to content

About

CLI tool to compile TypeScript types into simple, alias-free primitives.

Resources

Code of conduct

Contributing

Stars

20 stars

Watchers

1 watching

Forks

Repository files navigation

ts-simplify

CLI tool to compile TypeScript types into simple, alias-free primitives.

Usage

ts-simplify <source> [output]

This can be run via npx without installation, eg:

npx ts-simplify <source> [output]

Example

If you have a TypeScript file with exported types:

// example-types.ts
type MyType = { a: "A", b: "B", nested: Nested };
type Nested = { c:"C" };
export type MyType = Omit<MyType, 'b'>;

Running this:

ts-simplify ./example-types.ts ./example-types.d.ts

will output this:

// example-types.d.ts
export type MyType = { a: "A", nested: { c: "C" } };

About

CLI tool to compile TypeScript types into simple, alias-free primitives.

Resources

Code of conduct

Contributing

Stars

20 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages