-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS to JSDoc Conversion #8569
TS to JSDoc Conversion #8569
Conversation
@tcc-sejohnson is attempting to deploy a commit to the Svelte Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey, just curious: why is this change being made? I was looking around for an issue or something for discussion around this but I couldn't find anything. |
As a Svelte compiler developer, debugging without a build step greatly simplifies compiler development. Previously, debugging was complicated by the fact that we had to debug using the build step. Of course, Svelte developers (not compiler developers) will still be provided type definition files as now, so there will be no change for Svelte developers in terms of typing. |
If the problem is reducing tests execution time maybe it is much better to focus on picking a faster Typescript transpiler (like esbuild or swc) rather than switching codebase from one language to a two separated ones what can cause new troubles like code desynchronization and weak abstraction relations? |
No. often library developers use The main point at present is whether TS or JS + JSDoc is more comfortable to write. |
Happened to see this on Twitter during lunch. I maintain the VS Code JS debugger.
It's an aside from the main PR, but I'm not entirely sure what you mean here. This should not exclude the ability to use alternative TS compilers--in fact, the js debugger itself is built with esbuild. The debugger should also handle runtime transpilers (like tsx) just fine. One snag you might hit with npm link is that by default we don't follow sourcemaps in node_modules for performance reasons, but this can be adjusted by setting |
As someone who has no stake in Svelte nor actively uses it I would be very much interested in a blog post describing the difficulties of using TS and why JSDoc + JS is seen as a better alternative so I can broaden my knowledge and understanding. |
I wrote this some 2 years ago, should be relevant even now https://puruvj.dev/blog/get-to-know-typescript--using-typescript-without-typescript |
Here’s some context: |
I'm locking this PR for now to not distract maintainers with this conversation which was had multiple times before. As a user of Svelte this has NO impact whatsoever on you, and rest assured that the Svelte code base keeps the same level of type safety with this change. |
…src/compiler/compile/render_dom/wrappers/shared/bind_this.js
…ing_comment.ts to JavaScript
…_comment.ts to src/compiler/compile/render_dom/wrappers/shared/create_debugging_comment.js
…e_debugging_comment.js
…nition.ts to JavaScript
…ion.ts to src/compiler/compile/render_dom/wrappers/shared/get_slot_definition.js
…lot_definition.js
… src/compiler/compile/render_dom/wrappers/shared/is_dynamic.js
…ck_bindings.ts to JavaScript
…bindings.ts to src/compiler/compile/render_dom/wrappers/shared/mark_each_block_bindings.js
…each_block_bindings.js
…e/compiler_warnings.js
- generate-types script: deal with default imports - store: private/public types split - SvelteComponentDev/Typed: remove need for interface
For some reason GitHub fucked up and didn't mark this as merged into #8480, so I'm going to close this |
HEADS UP: BIG RESTRUCTURING UNDERWAY
The Svelte repo is currently in the process of heavy restructuring for Svelte 4. After that, work on Svelte 5 will likely change a lot on the compiler aswell. For that reason, please don't open PRs that are large in scope, touch more than a couple of files etc. In other words, bug fixes are fine, but feature PRs will likely not be merged.
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests
npm test
and lint the project withnpm run lint