8 lines
121 B
JavaScript
8 lines
121 B
JavaScript
function foo(x?: number) {}
|
|
foo(undefined); // ok
|
|
|
|
function bar(x = "bar"): string {
|
|
return x;
|
|
}
|
|
bar(undefined); // ok
|