@@ -166,40 +166,49 @@ function createOnActionCallback(
166
166
} ;
167
167
}
168
168
169
- export type Configs < S > = Array < AssistantConfig < Assistant < any > , S > > ;
170
-
171
- export function ofStatePart < K extends string , A extends Assistant < any > > (
172
- select : K ,
173
- config : { new ( ) : A }
174
- ) : AssistantConfig < A , { [ P in K ] : StateOfAssistant < A > } > ;
175
- export function ofStatePart < NewS , A extends Assistant < any > > (
176
- select : ( s : NewS ) => StateOfAssistant < A > ,
177
- config : { new ( ) : A }
178
- ) : AssistantConfig < A , NewS > ;
179
- export function ofStatePart <
180
- K extends string ,
181
- A extends Assistant < any > ,
182
- S = StateOfAssistant < A >
183
- > (
184
- select : K ,
185
- config : ConstructorAssistantConfig < A , S > | CreateAssistantConfig < A , S >
186
- ) : AssistantConfig < A , { [ P in K ] : S } > ;
187
- export function ofStatePart <
188
- NewS ,
189
- A extends Assistant < any > ,
190
- S = StateOfAssistant < A >
191
- > (
192
- select : ( s : NewS ) => S ,
193
- config : ConstructorAssistantConfig < A , S > | CreateAssistantConfig < A , S >
194
- ) : AssistantConfig < A , NewS > ;
195
- export function ofStatePart < K extends string , S > (
196
- select : K ,
197
- configs : Configs < S >
198
- ) : Configs < { [ P in K ] : S } > ;
199
- export function ofStatePart < NewS , S > (
200
- select : ( s : NewS ) => S ,
169
+ // export type Configs<S> = Array<AssistantConfig<Assistant<any>, S>>;
170
+ export type Configs < S > = Array < AssistantConfig < Assistant < S > , any > > ;
171
+
172
+ // export function ofStatePart<K extends string, A extends Assistant<any>>(
173
+ // select: K,
174
+ // config: { new (): A }
175
+ // ): AssistantConfig<A, { [P in K]: StateOfAssistant<A> }>;
176
+ // export function ofStatePart<NewS, A extends Assistant<any>>(
177
+ // select: (s: NewS) => StateOfAssistant<A>,
178
+ // config: { new (): A }
179
+ // ): AssistantConfig<A, NewS>;
180
+ // export function ofStatePart<
181
+ // K extends string,
182
+ // A extends Assistant<any>,
183
+ // S = StateOfAssistant<A>
184
+ // >(
185
+ // select: K,
186
+ // config: ConstructorAssistantConfig<A, S> | CreateAssistantConfig<A, S>
187
+ // ): AssistantConfig<A, { [P in K]: S }>;
188
+ // export function ofStatePart<
189
+ // NewS,
190
+ // A extends Assistant<any>,
191
+ // S = StateOfAssistant<A>
192
+ // >(
193
+ // select: (s: NewS) => S,
194
+ // config: ConstructorAssistantConfig<A, S> | CreateAssistantConfig<A, S>
195
+ // ): AssistantConfig<A, NewS>;
196
+ // export function ofStatePart<K extends string, S>(
197
+ // select: K,
198
+ // configs: Configs<S>
199
+ // ): Configs<{ [P in K]: S }>;
200
+ // export function ofStatePart<NewS, S>(
201
+ // select: (s: NewS) => S,
202
+ // configs: Configs<S>
203
+ // ): Configs<NewS>;
204
+ export function ofStatePart < S > (
205
+ select : ( ( s : any ) => any ) | string ,
201
206
configs : Configs < S >
202
- ) : Configs < NewS > ;
207
+ ) : Configs < any > ;
208
+ export function ofStatePart < S > (
209
+ select : ( ( s : any ) => any ) | string ,
210
+ configs : AssistantConfig < Assistant < S > , any >
211
+ ) : AssistantConfig < Assistant < any > , any > ;
203
212
/** Implementation */
204
213
export function ofStatePart (
205
214
select : string | ( ( s : any ) => any ) ,
0 commit comments