export interface ILimit {
amount: number | null;
period: Period | null;
}
export enum Period {
MONTH = "MONTH",
WEEK = "WEEK",
}
builder results:
/**
* This module was automatically generated by `ts-interface-builder`
*/
import * as t from "ts-interface-checker";
// tslint:disable:object-literal-key-quotes
export const ILimit = t.iface([], {
"amount": t.union("number", "null"),
"period": t.union("Period", "null"),
});
export const Period = t.enumtype({
"MONTH": "MONTH",
"WEEK": "WEEK",
});
const exportedTypeSuite: t.ITypeSuite = {
ILimit,
Period,
};
export default exportedTypeSuite;
TS compiler errors:
schema-validation.ts:12:25 - error TS2339: Property 'enumtype' does not exist on type 'typeof import("/node_modules/ts-interface-checker/dist/index")'.
12 export const Period = t.enumtype({
~~~~~~~~
Thank you for adding support for enums! Please take a look at the issue below.
package.json:
TS source:
builder results:
TS compiler errors: