1 min readJan 24, 2019
Charles Maynard you can use an identity function to be more explicit about the intended type of your literal, but I’m not sure why you’d prefer that to just declaring the type:
let obj: type = literal;
Charles Maynard you can use an identity function to be more explicit about the intended type of your literal, but I’m not sure why you’d prefer that to just declaring the type:
let obj: type = literal;
Software Developer @sidewalklabs, author of Effective TypeScript