ts-interface-keys-transformer
ts-interface-keys-transformer copied to clipboard
Nested interface with indexer does not work
Compiling the following code
import { keys } from 'ts-interface-keys-transformer';
interface working {
name: string;
[index: string]: string;
}
const workingKeys = keys<working>()
interface notWorking {
working: working;
[index: string]: any;
}
const notWorkingKeys = keys<notWorking>()
generates the following error
$ npx ttsc test.ts
Cannot read property 'intrinsicName' of undefined
Removing the [index: string]: string;
fixes the issue.
I am pretty new to TypeScript, is [index: string]: any;
should be supported?