TypeScript/tests/cases/compiler/interfaceMergedUnconstrainedNoErrorIrrespectiveOfOrder.ts
Wesley Wigham 5e06bea481
getConstraintDeclaration gets the first declaration with a constraint… (#33426)
* getConstraintDeclaration gets the first declaration with a constraint, rather than just the first declaration

* Add type annotation

* Update comment
2019-09-18 13:56:24 -07:00

19 lines
506 B
TypeScript

// @filename: working.ts
// minmal samples from #33395
export namespace ns {
interface Function<T extends (...args: any) => any> {
throttle(): Function<T>;
}
interface Function<T> {
unary(): Function<() => ReturnType<T>>;
}
}
// @filename: regression.ts
export namespace ns {
interface Function<T> {
unary(): Function<() => ReturnType<T>>;
}
interface Function<T extends (...args: any) => any> {
throttle(): Function<T>;
}
}