4 ms·
TLDR: rename files to .ts, download type definitions for external libraries, silence TypeScript compiler warnings using 'any'
by Dolores12 10y ago
TLDR: rename files to .ts, download type definitions for external libraries, silence TypeScript compiler warnings using 'any'
- chrismbarr 10y agoMaybe initially, but that `any` type really defeats the purpose of having types in the first place. Where I work we have several 100% TS apps and we've banned the `any` type except for very rare exceptions. It's always better to define a type so that it can be easily used elsewhere, and it also helps prevent typos.
- k__ 10y agofor data objects (no methods) you could at least use Object instead of any, this should prevent anyone from calling methods on it.