Browse Source

types(props): fix typo on prototype (#1334)

Carlos Rodrigues 5 years ago
parent
commit
4c4f39b6ea
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/runtime-core/src/componentProps.ts

+ 2 - 2
packages/runtime-core/src/componentProps.ts

@@ -53,8 +53,8 @@ type PropConstructor<T = any> =
   | { (): T }
   | { (): T }
   | PropMethod<T>
   | PropMethod<T>
 
 
-type PropMethod<T> = T extends (...args: any) => any // if is function with args
-  ? { new (): T; (): T; readonly proptotype: Function } // Create Function like constructor
+type PropMethod<T, TConstructor = any> = T extends (...args: any) => any // if is function with args
+  ? { new (): TConstructor; (): T; readonly prototype: TConstructor } // Create Function like constructor
   : never
   : never
 
 
 type RequiredKeys<T, MakeDefaultRequired> = {
 type RequiredKeys<T, MakeDefaultRequired> = {