Open rui-han-crh opened 1 year ago
Typescript now allows the default keyword to be used when exporting an interface, for example
default
export default interface DataModelConfig { currentScore: number, progress: number[] | null }
However, the current command npx ts-interface-builder path/to/file.ts will produce files with the interface named as default.
npx ts-interface-builder path/to/file.ts
/** * This module was automatically generated by `ts-interface-builder` */ import * as t from "ts-interface-checker"; // tslint:disable:object-literal-key-quotes export const default = t.iface([], { "currentScore": "number", "progress": t.union(t.array("number"), "null"), }); const exportedTypeSuite: t.ITypeSuite = { default, }; export default exportedTypeSuite;
This can't be used because default is a reserved keyword. There might be some parsing issue with the interface names when default is specified.
Typescript now allows the
default
keyword to be used when exporting an interface, for exampleHowever, the current command
npx ts-interface-builder path/to/file.ts
will produce files with the interface named asdefault
.This can't be used because
default
is a reserved keyword. There might be some parsing issue with the interface names whendefault
is specified.