Demonstrates bug with declaration output of mapped types in TypeScript 2.3.4.
Usage:
npm install
npm run build
- Observe invalid syntax in
dist/index.d.ts
, which needs but lacks quotes around the keys in the declaration ofscopes
:
export declare const scopes: {
noun:verb: "noun:verb";
verb:adjective: "verb:adjective";
noun: "noun";
};
export declare type Scope = keyof typeof scopes;