12 lines
577 B
Text
12 lines
577 B
Text
|
==== tests/cases/compiler/overloadingOnConstantsInImplementation.ts (3 errors) ====
|
||
|
function foo(a: 'hi', x: string);
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
!!! Specialized overload signature is not assignable to any non-specialized signature.
|
||
|
function foo(a: 'hi', x: string);
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
!!! Specialized overload signature is not assignable to any non-specialized signature.
|
||
|
function foo(a: 'hi', x: any) {
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
}
|
||
|
~
|
||
|
!!! A signature with an implementation cannot use a string literal type.
|