7
7
WatchHandler ,
8
8
DirectiveOptions ,
9
9
DirectiveFunction ,
10
- RecordPropsDefinition ,
11
- ThisTypedComponentOptionsWithArrayProps ,
12
- ThisTypedComponentOptionsWithRecordProps ,
10
+ PropsDefinition ,
11
+ ThisTypedComponentOptions ,
13
12
WatchOptions ,
14
13
} from "./options" ;
15
14
import { VNode , VNodeData , VNodeChildren , ScopedSlot } from "./vnode" ;
@@ -78,15 +77,12 @@ export interface VueConfiguration {
78
77
}
79
78
80
79
export interface VueConstructor < V extends Vue = Vue > {
81
- new < Data = object , Methods = object , Computed = object , PropNames extends string = never > ( options ?: ThisTypedComponentOptionsWithArrayProps < V , Data , Methods , Computed , PropNames > ) : CombinedVueInstance < V , Data , Methods , Computed , Record < PropNames , any > > ;
82
- // ideally, the return type should just contain Props, not Record<keyof Props, any>. But TS requires to have Base constructors with the same return type.
83
- new < Data = object , Methods = object , Computed = object , Props = object > ( options ?: ThisTypedComponentOptionsWithRecordProps < V , Data , Methods , Computed , Props > ) : CombinedVueInstance < V , Data , Methods , Computed , Record < keyof Props , any > > ;
80
+ // ideally, the return type should just contains Props, not Record<keyof Props, any>. But TS requires Base constructors must all have the same return type.
81
+ new < Data = object , Methods = object , Computed = object , Props = object > ( options ?: ThisTypedComponentOptions < V , Data , Methods , Computed , Props > ) : CombinedVueInstance < V , Data , Methods , Computed , Record < keyof Props , any > > ;
84
82
new ( options ?: ComponentOptions < V > ) : CombinedVueInstance < V , object , object , object , Record < keyof object , any > > ;
85
83
86
- extend < Data , Methods , Computed , PropNames extends string = never > ( options ?: ThisTypedComponentOptionsWithArrayProps < V , Data , Methods , Computed , PropNames > ) : ExtendedVue < V , Data , Methods , Computed , Record < PropNames , any > > ;
87
- extend < Data , Methods , Computed , Props > ( options ?: ThisTypedComponentOptionsWithRecordProps < V , Data , Methods , Computed , Props > ) : ExtendedVue < V , Data , Methods , Computed , Props > ;
88
- extend < PropNames extends string = never > ( definition : FunctionalComponentOptions < Record < PropNames , any > , PropNames [ ] > ) : ExtendedVue < V , { } , { } , { } , Record < PropNames , any > > ;
89
- extend < Props > ( definition : FunctionalComponentOptions < Props , RecordPropsDefinition < Props > > ) : ExtendedVue < V , { } , { } , { } , Props > ;
84
+ extend < Data , Methods , Computed , Props > ( options ?: ThisTypedComponentOptions < V , Data , Methods , Computed , Props > ) : ExtendedVue < V , Data , Methods , Computed , Props > ;
85
+ extend < Props > ( definition : FunctionalComponentOptions < Props , PropsDefinition < Props > > ) : ExtendedVue < V , { } , { } , { } , Props > ;
90
86
extend ( options ?: ComponentOptions < V > ) : ExtendedVue < V , { } , { } , { } , { } > ;
91
87
92
88
nextTick ( callback : ( ) => void , context ?: any [ ] ) : void ;
@@ -105,10 +101,8 @@ export interface VueConstructor<V extends Vue = Vue> {
105
101
component ( id : string ) : VueConstructor ;
106
102
component < VC extends VueConstructor > ( id : string , constructor : VC ) : VC ;
107
103
component < Data , Methods , Computed , Props > ( id : string , definition : AsyncComponent < Data , Methods , Computed , Props > ) : ExtendedVue < V , Data , Methods , Computed , Props > ;
108
- component < Data , Methods , Computed , PropNames extends string = never > ( id : string , definition ?: ThisTypedComponentOptionsWithArrayProps < V , Data , Methods , Computed , PropNames > ) : ExtendedVue < V , Data , Methods , Computed , Record < PropNames , any > > ;
109
- component < Data , Methods , Computed , Props > ( id : string , definition ?: ThisTypedComponentOptionsWithRecordProps < V , Data , Methods , Computed , Props > ) : ExtendedVue < V , Data , Methods , Computed , Props > ;
110
- component < PropNames extends string > ( id : string , definition : FunctionalComponentOptions < Record < PropNames , any > , PropNames [ ] > ) : ExtendedVue < V , { } , { } , { } , Record < PropNames , any > > ;
111
- component < Props > ( id : string , definition : FunctionalComponentOptions < Props , RecordPropsDefinition < Props > > ) : ExtendedVue < V , { } , { } , { } , Props > ;
104
+ component < Data , Methods , Computed , Props > ( id : string , definition ?: ThisTypedComponentOptions < V , Data , Methods , Computed , Props > ) : ExtendedVue < V , Data , Methods , Computed , Props > ;
105
+ component < Props > ( id : string , definition : FunctionalComponentOptions < Props , PropsDefinition < Props > > ) : ExtendedVue < V , { } , { } , { } , Props > ;
112
106
component ( id : string , definition ?: ComponentOptions < V > ) : ExtendedVue < V , { } , { } , { } , { } > ;
113
107
114
108
use < T > ( plugin : PluginObject < T > | PluginFunction < T > , options ?: T ) : this;
0 commit comments