Skip to content

Commit

Permalink
feat(typescript): expose FileRegistry in proxyCreateProgram() (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
zcf0508 committed Feb 4, 2024
1 parent 1b11a8c commit 780fdd1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/typescript/lib/node/proxyCreateProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,12 @@ export function proxyCreateProgram(
});
};

const program = Reflect.apply(target, thisArg, [options]);
const program = Reflect.apply(target, thisArg, [options]) as ts.Program;

decorateProgram(files, program);

(program as any).__volar__ = { files };

return program;

function resolveModuleName(name: string, containingFile: string, options: ts.CompilerOptions, redirectedReference: ts.ResolvedProjectReference | undefined) {
Expand Down

0 comments on commit 780fdd1

Please sign in to comment.