You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As pointed out at #949 (comment), one important caveat to using ts-morph to analyze Deno code is that even though ts-morph runs in Deno, it cannot be used to analyze Deno code out of the box. Deno has a lot of custom Compiler API code to do what they do. For example, the TS compiler out of the box, doesn't know how to read module specifiers with an extension.
Deno's Module Resolution
Add helper host
Look into module resolution caching (forget exactly what it is and I'm lazy to look it up at the moment)
Deno requires custom module resolution. This can be implemented by doing something like this as outlined in the custom module resolution docs:
I think there's stuff like resolution host caching and other things that's not being done properly yet here though, so just be aware that things here are subject to change, though they won't change much.
@deno-types
Investigate how @deno-types works
Deno allows specifying a declaration file for imports and exports. For example:
As pointed out at #949 (comment), one important caveat to using ts-morph to analyze Deno code is that even though ts-morph runs in Deno, it cannot be used to analyze Deno code out of the box. Deno has a lot of custom Compiler API code to do what they do. For example, the TS compiler out of the box, doesn't know how to read module specifiers with an extension.
Deno's Module Resolution
Deno requires custom module resolution. This can be implemented by doing something like this as outlined in the custom module resolution docs:
That said, I've added a reusable host that makes this slightly easier, so you can do this:
I think there's stuff like resolution host caching and other things that's not being done properly yet here though, so just be aware that things here are subject to change, though they won't change much.
@deno-types
@deno-types
worksDeno allows specifying a declaration file for imports and exports. For example:
Remote Modules
Other?
isDeno: true
orruntimeType: Runtimes.Deno
or something like that to make this even easier?The text was updated successfully, but these errors were encountered: