26 lines
No EOL
1.4 KiB
Text
26 lines
No EOL
1.4 KiB
Text
tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(6,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
|
tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
|
tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
|
|
|
|
|
==== tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts (3 errors) ====
|
|
class Base { foo() { } }
|
|
class Derived1 extends Base { bar() { } }
|
|
class Derived2 extends Base { baz() { } }
|
|
class Derived3 extends Base { biz() { } }
|
|
|
|
function foo(tagName: 'canvas'): Derived3;
|
|
~~~
|
|
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
|
function foo(tagName: 'div'): Derived2;
|
|
~~~
|
|
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
|
function foo(tagName: 'span'): Derived1;
|
|
~~~
|
|
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
|
function foo(tagName: number): Base;
|
|
function foo(tagName: any): Base {
|
|
|
|
return null;
|
|
}
|
|
|