mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
647 B
TypeScript
33 lines
647 B
TypeScript
//// [tests/cases/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts] ////
|
|
|
|
//// [indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.ts]
|
|
type AnyFunction = (...args: any[]) => any;
|
|
type Params<T> = Parameters<Extract<T, AnyFunction>>;
|
|
|
|
interface Wrapper<T> {
|
|
call<K extends keyof T>(event: K, ...args: Params<T[K]>): void;
|
|
}
|
|
|
|
interface AWrapped {
|
|
foo(): void;
|
|
}
|
|
|
|
class A {
|
|
foo: Wrapper<AWrapped>;
|
|
}
|
|
|
|
interface BWrapped extends AWrapped {
|
|
bar(): void;
|
|
}
|
|
|
|
class B extends A {
|
|
foo: Wrapper<BWrapped>;
|
|
}
|
|
|
|
//// [indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js]
|
|
"use strict";
|
|
class A {
|
|
}
|
|
class B extends A {
|
|
}
|