Closed kungfooman closed 8 months ago
Example:
const str = `{ [Key in 1|2|3]: { testkey: [Key, Key, Key], bla: Key, Key: number } }`; const mapping = expandType(str); const type = createTypeFromMapping(mapping, console.warn); const key = type.properties[1].properties.bla; console.log(`The key should be 1: ${key} (${key === 1})`, {type}); setRight(JSON.stringify(type, null, 2));
REPL
Console output:
Example:
REPL
Console output: