How to fix Type 'number' is not assignable to type 'string' in TypeScript | DevErrors