More tests:default-valued parameter+strictNullChecks
This commit is contained in:
parent
bb9b6819b3
commit
96c14de26a
1 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
// @strictNullChecks: true
|
||||
function f(addUndefined1 = "J", addUndefined2?: number) {
|
||||
return addUndefined1.length + (addUndefined2 || 0);
|
||||
}
|
||||
function g(addUndefined = "J", addDefined: number) {
|
||||
return addUndefined.length + addDefined;
|
||||
}
|
||||
let total = f() + f('a', 1) + f('b') + f(undefined, 2);
|
||||
total = g('c', 3) + g(undefined, 4);
|
||||
|
|
Loading…
Reference in a new issue