* make splice `deleteCount` required in es5.d.ts In ES5 `deleteCount` is not an optional argument. If it is not provided it defaults to 0 as a side effect of `undefined` being converted to an integer. In ES6 `deleleteCount` is optional, and it defaults to the length of the array minus the start index. If you are targeting ES5 but don't provide `deleteCount` the behaviour will be different depending on the environment your build is running in. fixes #32638 * update baselines
13 lines
717 B
Plaintext
13 lines
717 B
Plaintext
=== tests/cases/compiler/spliceES6.ts ===
|
|
// see #32638
|
|
var arr1 = [0].splice(0)
|
|
>arr1 : Symbol(arr1, Decl(spliceES6.ts, 1, 3))
|
|
>[0].splice : Symbol(Array.splice, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
|
>splice : Symbol(Array.splice, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
|
|
|
var arr2 = [0].splice(0, 1)
|
|
>arr2 : Symbol(arr2, Decl(spliceES6.ts, 2, 3))
|
|
>[0].splice : Symbol(Array.splice, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
|
>splice : Symbol(Array.splice, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
|
|