File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,15 @@ export class Printer {
5959 if ( this . typeToString ( type ) . endsWith ( "[]" ) ) {
6060 return this . typeToString ( type ) ;
6161 } else if ( type . flags & ts . TypeFlags . Object ) {
62+ const decl = type . getSymbol ( ) ?. declarations ?. [ 0 ] ;
63+ if ( decl && ts . isFunctionTypeNode ( decl ) ) {
64+ return "Function" ;
65+ }
66+
6267 if ( inner ) {
6368 return "object" ;
6469 }
70+
6571 const properties = type . getProperties ( ) ;
6672 const props : Record <
6773 string ,
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
123123 required: true
124124 },
125125 function: {
126- type: Object ,
126+ type: Function ,
127127 required: true
128128 },
129129 error: {
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ defineProps<
5050" array" : string [],
5151" genericArray" : (string | number )[],
5252" genericCondition" : string | number ,
53- " function" : object ,
53+ " function" : Function ,
5454" error" : object ,
5555" null" : null | string ,
5656} & {
You can’t perform that action at this time.
0 commit comments