File tree Expand file tree Collapse file tree 6 files changed +13
-13
lines changed
component-meta/class-slots Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -22,5 +22,5 @@ import HelloWorld from './HelloWorld.vue'
22
22
import type { ComponentProps , ComponentSlots } from ' vue-component-type-helpers'
23
23
24
24
type Props = ComponentProps <typeof HelloWorld > // { msg: string }
25
- type Slots = ComponentSlots <typeof HelloWorld > // { header(_ : { num: number; }): any; footer(_ : { str: string; }): any; }
25
+ type Slots = ComponentSlots <typeof HelloWorld > // { header?: (props : { num: number; }) => any; footer?: (props : { str: string; }) => any; }
26
26
` ` `
Original file line number Diff line number Diff line change @@ -28,15 +28,15 @@ type __VLS_PrettifyLocal<T> = {
28
28
`;
29
29
30
30
exports[`vue-tsc-dts > Input: class-slots/component.vue, Output: class-slots/component.vue.d.ts 1`] = `
31
- "import { VNode } from 'vue';
31
+ "import type { VNode } from 'vue';
32
32
declare const _default: new () => {
33
33
$slots : {
34
- default( _ : {
34
+ default: ( props : {
35
35
num: number ;
36
- }): VNode [];
37
- foo( _ : {
36
+ }) => VNode [];
37
+ foo : ( props : {
38
38
str: string ;
39
- }): VNode [];
39
+ }) => VNode [];
40
40
};
41
41
} ;
42
42
export default _default;
Original file line number Diff line number Diff line change 1
1
<script lang="ts">
2
- import { VNode } from ' vue' ;
2
+ import type { VNode } from ' vue' ;
3
3
4
4
export default {} as new () => {
5
5
$slots: {
6
- default( _ : { num: number ; }): VNode [];
7
- foo( _ : { str: string ; }): VNode [];
6
+ default: ( props : { num: number ; }) => VNode [];
7
+ foo: ( props : { str: string ; }) => VNode [];
8
8
};
9
9
};
10
10
</script >
Original file line number Diff line number Diff line change 1
1
<script lang="ts" setup>
2
2
let UntypedComponent: new () => {
3
3
$slots: {
4
- default: (_ : any ) => any
4
+ default: (props : any ) => any
5
5
}
6
6
} = {} as any ;
7
7
</script >
Original file line number Diff line number Diff line change 12
12
<script lang="ts" setup generic =" T extends Record <string , string >" >
13
13
defineSlots <
14
14
{
15
- [K in ` cell:${string } ` ]?: (_ : { value: T [keyof T ] }) => any ;
15
+ [K in ` cell:${string } ` ]?: (props : { value: T [keyof T ] }) => any ;
16
16
} & {
17
- default ?: (_ : Record <string , any >) => any ;
17
+ default ?: (props : Record <string , any >) => any ;
18
18
}
19
19
> ();
20
20
</script >
Original file line number Diff line number Diff line change 28
28
<script lang="ts">
29
29
export default {
30
30
name: ' Self' ,
31
- slots: Object as SlotsType <{ foo? : (_ : any ) => any }>,
31
+ slots: Object as SlotsType <{ foo? : (props : any ) => any }>,
32
32
};
33
33
34
34
declare const Comp: new <T >(props : { value: T ; }) => {
You can’t perform that action at this time.
0 commit comments