DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
9+2 =
Submit