13 lines
177 B
JavaScript
13 lines
177 B
JavaScript
|
//// [stringLiteralType.ts]
|
||
|
var x: 'hi';
|
||
|
|
||
|
function f(x: 'hi');
|
||
|
function f(x: string);
|
||
|
function f(x: any) {
|
||
|
}
|
||
|
|
||
|
//// [stringLiteralType.js]
|
||
|
var x = 'hi';
|
||
|
function f(x) {
|
||
|
}
|