Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

dynamic key interface typescript

type MyKey = 'key1' | 'key2' | ...

const myObject: Record<MyKey, object[]> = { ... }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamic #key #interface #typescript
ADD COMMENT
Topic
Name
4+1 =