Skip to content

Commit e1c0e3a

Browse files
authored
fix: adaptation of vue-tsc@3.0.3 (#63)
1 parent b08f91d commit e1c0e3a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/tsc/vue.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ export function createVueProgramFactory(
4646
| (Ts.TsConfigSourceFile & { vueCompilerOptions?: any })
4747
| undefined
4848

49-
const resolver = new vue.CompilerOptionsResolver()
49+
const resolver = new vue.CompilerOptionsResolver(ts.sys.fileExists)
5050
resolver.addConfig($configRaw?.vueCompilerOptions ?? {}, $rootDir)
5151
const vueOptions = resolver.build()
5252

53+
vue.writeGlobalTypes(vueOptions, ts.sys.writeFile)
5354
const vueLanguagePlugin = vue.createVueLanguagePlugin<string>(
5455
ts,
5556
options.options,

tests/__snapshots__/tsc.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ declare global {
157157
foo: string;
158158
}
159159
}
160-
declare const _default: vue0.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue0.ComponentProvideOptions, false, {}, any>;
160+
declare const _default: vue0.DefineComponent<__VLS_Props, void, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue0.ComponentProvideOptions, false, {}, any>;
161161
//#endregion
162162
export { _default as App };"
163163
`;
@@ -352,7 +352,7 @@ declare const _default: vue0.DefineComponent<{
352352
onVnodeUpdated?: ((vnode: vue0.VNode, oldVNode: vue0.VNode) => void) | ((vnode: vue0.VNode, oldVNode: vue0.VNode) => void)[];
353353
onVnodeBeforeUnmount?: ((vnode: vue0.VNode) => void) | ((vnode: vue0.VNode) => void)[];
354354
onVnodeUnmounted?: ((vnode: vue0.VNode) => void) | ((vnode: vue0.VNode) => void)[];
355-
}, {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<{
355+
}, void, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<{
356356
foo: string;
357357
bar?: string;
358358
innerHTML?: string;

0 commit comments

Comments
 (0)