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