Skip to content

Commit 9abc33f

Browse files
committed
test
1 parent 87d71fc commit 9abc33f

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

packages/vue-language-core/src/utils/localTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export type EmitEvent<F, E> =
8686
export declare function asFunctionalComponent<T, K>(t: T, instance?: K):
8787
T extends (...args: any) => any ? T
8888
: K extends { $props?: infer Props, $slots?: infer Slots, $emit?: infer Emit }
89-
? (props: Props, ctx?: { attrs?: any, expose?: any, slots?: Slots, emit?: Emit }) => JSX.Element & { __ctx?: typeof ctx, __props?: typeof props }
89+
? (props: Props, ctx?: { attrs?: any, expose?: any, slots?: Slots, emit?: Emit }) => JSX.Element & { __ctx?: typeof ctx, __props?: typeof props }
9090
: (_: T) => { __ctx?: { attrs?: undefined, expose?: undefined, slots?: undefined, emit?: undefined }, __props?: T }; // IntrinsicElement
9191
export declare function pickEvent<Emit, K, E>(emit: Emit, emitKey: K, event: E): FillingEventArg<
9292
PickNotAny<
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<script lang="tsx">
2+
export default {};
3+
</script>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"jsx": "preserve",
5+
"noPropertyAccessFromIndexSignature": true,
6+
},
7+
"vueCompilerOptions": {
8+
"target": 2.7
9+
},
10+
"include": [
11+
"**/*.ts",
12+
"**/*.vue",
13+
"**/*.html",
14+
]
15+
}

packages/vue-tsc/tests/index.spec.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,34 @@ describe(`vue-tsc`, () => {
3333
});
3434
}), 40_000);
3535
});
36+
37+
38+
describe(`vue-tsc vue 2`, () => {
39+
it(`vue-tsc no errors`, () => new Promise((resolve, reject) => {
40+
const cp = fork(
41+
binPath,
42+
['--noEmit'],
43+
{
44+
silent: true,
45+
cwd: path.resolve(__dirname, '../../vue-test-workspace/vue-tsc-vue2')
46+
},
47+
);
48+
49+
cp.stdout?.setEncoding('utf8');
50+
cp.stdout?.on('data', (data) => {
51+
console.log(data);
52+
});
53+
cp.stderr?.setEncoding('utf8');
54+
cp.stderr?.on('data', (data) => {
55+
console.error(data);
56+
});
57+
58+
cp.on('exit', (code) => {
59+
if (code === 0) {
60+
resolve(undefined);
61+
} else {
62+
reject(new Error(`Exited with code ${code}`));
63+
}
64+
});
65+
}), 40_000);
66+
});

0 commit comments

Comments
 (0)