Hacker News new | ask | show | jobs
by MonstraG 668 days ago
Can you share what was the problem, just in case we have it too?
2 comments

We had little strings that encoded call signatures, like "iiff" for int int float float. Someone cooked up a way to have typescript validate the strings at build time, but the way it does typechecks against string literals like that seems to cause every string literal in your entire compilation to get validated in advance to figure out whether it could possibly be that specific type. Each possible value - let's say we had 'f', 'i', and 'l' originally and then we added a fourth option for 'd' - caused the typecheck time to magnify by increasing the possible options. IIRC.
I'd bet it had to do with complex templates.

I've had typescript break on me when using libraries like elysia that go full send on their templates.