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
I used the program.__vue.langaugeContext to get the virtualFile and then calculate the new offset in the first commit.
But when I update the volar.js to 2.0, the program no longer exposes the languageContext and virtualFile. So I consider returning the FileRegistry when using proxyCreateProgram to create the program.Like thie.
If you have a plan to expose the FileRegistry or the other relevant object in other ways, I will wait for you to finish before continuing with further modifications. Alternatively, I can submit a pr according to the above plan.
The text was updated successfully, but these errors were encountered:
Hi, I'm working on a vscode extension ts-type-explorer that provides a view to know a type in the
js
orts
file and I added support for Vue files to this extension. See zcf0508/ts-type-explorer@c306370#diff-0d574bd7891645b07141f9f400e0830e391153bc3d2e7618245fcd8e86bd42fb .I see that
volar.js
2.0 is released recently, and I try to make my code compatible with it. See zcf0508/ts-type-explorer@e62e1cc#diff-0d574bd7891645b07141f9f400e0830e391153bc3d2e7618245fcd8e86bd42fb .I used the
program.__vue.langaugeContext
to get thevirtualFile
and then calculate the new offset in the first commit.But when I update the
volar.js
to 2.0, theprogram
no longer exposes thelanguageContext
andvirtualFile
. So I consider returning theFileRegistry
when usingproxyCreateProgram
to create the program.Like thie.// https://github.com/volarjs/volar.js/blob/v2.0.0/packages/typescript/lib/node/proxyCreateProgram.ts#L131 const program = Reflect.apply(target, thisArg, [options]); decorateProgram(files, program); + program.files = files return program;
@johnsoncodehk
If you have a plan to expose the
FileRegistry
or the other relevant object in other ways, I will wait for you to finish before continuing with further modifications. Alternatively, I can submit a pr according to the above plan.The text was updated successfully, but these errors were encountered: