Back

dev.to

TypeScript is wasting my time

4/22/2022Updated 3/22/2026
https://dev.to/gmartigny/typescript-is-wasting-my-time-130n

While converting a medium sized Nuxt application (~15 pages, i18n, auth, REST API) to TypeScript, I compiled a list of pain points (no specific order). This is not the first time that TS made me miserable while trying to use it. Maybe this is a "me" problem and I lack knowledge or skills. But, if this is the case, I bet that a lot of new developers also hit these roadblocks and didn't say anything because of the hype surrounding TS. … Playground The `options` parameter is underlined with an error because the field `notation` is a string when it should be `"compact" | "standard" | "scientific" | "engineering" | undefined`. Well ... it's hardcoded to `"compact"`, which is pretty close to `"compact"` to me. … The worst part is not even that **I** have to tell TS that Nuxt is injecting my plugin everywhere. The worst part is that I have to make sure that every function signature in the plugin match with the interface. Why can't I infer types from the API itself ? Also, `ctrl + click` become useless as it points to the interface and not the implementation (maybe an IDE issue, but still ...). … - const assertion - type aliases - Mapped Types - this parameters - Intersection types - Record<Keys,Type> - Partial<Type> - Type assertions TypeScript is a compile time *static type checker*. Here you are assembling an object dynamically at runtime (in value space). TypeScript *hates* that - so you have to take TypeScript by the hand and explain to it like it's five.

Related Pain Points3