mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
32 lines
536 B
TypeScript
32 lines
536 B
TypeScript
//// [tests/cases/compiler/defaultArgsInOverloads.ts] ////
|
|
|
|
//// [defaultArgsInOverloads.ts]
|
|
function fun(a: string);
|
|
function fun(a = 3);
|
|
function fun(a = null) { }
|
|
|
|
class C {
|
|
fun(a: string);
|
|
fun(a = 3);
|
|
fun(a = null) { }
|
|
static fun(a: string);
|
|
static fun(a = 3);
|
|
static fun(a = null) { }
|
|
}
|
|
|
|
interface I {
|
|
fun(a: string);
|
|
fun(a = 3);
|
|
}
|
|
|
|
var f: (a = 3) => number;
|
|
|
|
//// [defaultArgsInOverloads.js]
|
|
"use strict";
|
|
function fun(a = null) { }
|
|
class C {
|
|
fun(a = null) { }
|
|
static fun(a = null) { }
|
|
}
|
|
var f;
|