logoalt Hacker News

unchar104/01/20252 repliesview on HN

From the link [3] you posted,

> If you're rabidly anti-TypeScript and think that us doing this vindicates your position, I'm about to disappoint you.

Rich and the rest of the Svelte team are still using typscript, just through JSDoc + type definition files.

In contrast the Nue team seems to want to keep the view layer untyped.

From the parent comment

> real static typing (like Rust or Go) shines in business logic where it counts

it seems they don't consider typescript to be "real" static typing.


Replies

CharlieDigital04/01/2025

TypeScript is not "real" static typing in the same sense as Go, Rust, C#; the type information disappears the moment you build it.

    function fn(x: string) {}
Will happily accept:

    fn(2)
At runtime (and thus the need for schema validators like Zod, Valibot, et al because dev-land "static typing" is a façade)

    > Rich and the rest of the Svelte team are still using typscript
To be clear, they are not "using" TypeScript, it's more accurate to say they are providing TypeScript bindings.

Their codebase (as in the actual code they are writing) is undoubtedly JS[0] with `.d.ts` bindings for TypeScript[1]. Author can also do the same and provide TS bindings at any point in the future.

[0] https://github.com/sveltejs/svelte/blob/main/packages/svelte...

[1] https://github.com/sveltejs/svelte/blob/main/packages/svelte...

show 5 replies
mplanchard04/01/2025

It’s not real static typing. A compiled typescript project is just javascript, which will still gladly accept incorrect types. The types only matter during compilation.

show 3 replies