Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/vs/platform/instantiation/common/instantiation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ export const IInstantiationService = createDecorator<IInstantiationService>('ins
* Given a list of arguments as a tuple, attempt to extract the leading, non-service arguments
* to their own tuple.
*/
export type GetLeadingNonServiceArgs<Args> =
Args extends [...BrandedService[]] ? []
: Args extends [infer A, ...BrandedService[]] ? [A]
: Args extends [infer A, ...infer R] ? [A, ...GetLeadingNonServiceArgs<R>]
: never;
export type GetLeadingNonServiceArgs<TArgs extends any[]> =
TArgs extends [] ? []
: TArgs extends [...infer TFirst, BrandedService] ? GetLeadingNonServiceArgs<TFirst>
: TArgs;

export interface IInstantiationService {

Expand Down