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

Function getCollectionImplementation

test/fixtures/snapshot/typescript.js:338–345  ·  view source on GitHub ↗
(name, nativeFactory, shimFactory)

Source from the content-addressed store, hash-verified

336 ts.Set = getCollectionImplementation("Set", "tryGetNativeSet", "createSetShim");
337 /* @internal */
338 function getCollectionImplementation(name, nativeFactory, shimFactory) {
339 var _a;
340 // NOTE: ts.ShimCollections will be defined for typescriptServices.js but not for tsc.js, so we must test for it.
341 var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
342 if (constructor)
343 return constructor;
344 throw new Error("TypeScript requires an environment that provides a compatible native ".concat(name, " implementation."));
345 }
346})(ts || (ts = {}));
347/* @internal */
348var ts;

Callers 1

typescript.jsFile · 0.85

Calls 1

concatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…