瀏覽代碼

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

Carlos Rodrigues 6 年之前
父節點
當前提交
4c4f39b6ea
共有 1 個文件被更改,包括 2 次插入2 次删除
  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 }
   | 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
 
 type RequiredKeys<T, MakeDefaultRequired> = {