Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

error on indexing the object in ts

type Person = { age: number; name: string; alive: boolean };

const key = "age";
type Age = Person[key];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #error #indexing #object #ts
ADD COMMENT
Topic
Name
9+5 =