MCPcopy Index your code
hub / github.com/nodejs/node / last

Function last

test/fixtures/snapshot/typescript.js:1327–1330  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

1325 }
1326 ts.lastOrUndefined = lastOrUndefined;
1327 function last(array) {
1328 ts.Debug.assert(array.length !== 0);
1329 return array[array.length - 1];
1330 }
1331 ts.last = last;
1332 /**
1333 * Returns the only element of an array if it contains only one element, `undefined` otherwise.

Callers

nothing calls this directly

Calls 1

assertMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…