1

for a record with id(number), but all other fields are strings. How to type it?

the following definition is invalid.

type RecordWithID = {
  id: number;
  [key: string]: string;
};

ps: edit int => number

echo
  • 2,666
  • 1
  • 25
  • 17

0 Answers0