This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416789 additions and 457836 deletions
-1
View File
@@ -9,6 +9,5 @@ export default class {
constructor(value: unknown);
isLeaking(): boolean;
private _runGarbageCollector;
private _isPrimitive;
}
//# sourceMappingURL=index.d.ts.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,CAAC,OAAO;IACZ,OAAO,CAAC,qBAAqB,CAAU;gBAE3B,KAAK,EAAE,OAAO;IAiC1B,SAAS,IAAI,OAAO;IAMpB,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,YAAY;CAGrB"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,MAAM,CAAC,OAAO;IACZ,OAAO,CAAC,qBAAqB,CAAU;gBAE3B,KAAK,EAAE,OAAO;IAiC1B,SAAS,IAAI,OAAO;IAMpB,OAAO,CAAC,oBAAoB;CAY7B"}
+11 -5
View File
@@ -35,6 +35,16 @@ function _prettyFormat() {
return data;
}
function _jestGetType() {
const data = require('jest-get-type');
_jestGetType = function _jestGetType() {
return data;
};
return data;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
@@ -57,7 +67,7 @@ class _default {
constructor(value) {
_defineProperty(this, '_isReferenceBeingHeld', void 0);
if (this._isPrimitive(value)) {
if ((0, _jestGetType().isPrimitive)(value)) {
throw new TypeError(
[
'Primitives cannot leak memory.',
@@ -109,10 +119,6 @@ class _default {
_v().default.setFlagsFromString('--no-expose-gc');
}
}
_isPrimitive(value) {
return value !== Object(value);
}
}
exports.default = _default;