Skip to content

Conversation

@jasonlyu123
Copy link
Member

#1965 #2228

Patching the releaseDocument methods of DocumentRegistry so it doesn't error. From my understanding, TypeScript doesn't use the impliedNodeFormat inside the DocumentRegistry. It'll always be treated as undefined for the svelte files. So, patching the releaseDocument part should be enough.

While we were here, I also changed to reuse the documentRegistry across language services. It should reduce some memory usage for files reused across language services. While checking if we can optimize the restart as well, I found that TypesScript added the support for scriptKind changes three years ago. So we no longer need to restart it because of scriptKind changes.

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great findings, thank you!

@dummdidumm dummdidumm merged commit bc82064 into sveltejs:master Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants