WIP Exploration of JSR type aquisition #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
This isn't intended to be merged. It's just going to be a record of my exploration.
I've started digging deeper into JSR type acquisition and what would be required to support JSR types. I need to dig more into what Deno's doing in their LSP...
I explored how @nandorojo was constructing his examples in #5. With the change I have below I've been able to get my webview package running successfully.
I was hoping it'd be just that simple (wouldn't that be a treat?). That works in some cases with relatively simple type declarations. I've got several other things I tired: switching how I handled declarations depending on if the declaration file was a global declaration or a module declaration (determined by if there's a top level export), separating out the imports and exports and only wrapping the exports in a declaration.
I need to spend more time with it. The biggest thing I think would be helpful is to be able to grab the diagnostics of these generated type files. Downstream type checking is failing so the compilers bail at a certain point and we get whatever it seems to have made it through. There's got to be a better way to get signal about why these modules aren't loading. I'm going to look at it more this week. @orta if you have thoughts, I'd love to hear them!