Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to add type using map in typescript

const x = ([{a: 1, b: 2}] as any).map((d: {c: string}) => ({...d, c: 'something new'}))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #type #map #typescript
ADD COMMENT
Topic
Name
1+7 =