grantila / typeconv

Convert between JSON Schema, TypeScript, GraphQL, Open API and SureType
MIT License
421 stars 8 forks source link

Invalid TS generated from ST #19

Open arv opened 2 years ago

arv commented 2 years ago

Using:

typeconv 1.7.0
node v17.4.0

input.ts

export type T = number | string;

And on the command line:

npx typeconv -f ts -t st -o out input.ts

Gives a file out/input.ts that contains this invalid import declaration:

import { suretype as , v as , compile as  } from 'suretype';

The generated import declaration should be:

import { suretype, v, compile} from 'suretype';