Skip to content

Commit

Permalink
Merge pull request #150 from rbuckton/release-0.2
Browse files Browse the repository at this point in the history
Update main to v0.2 release.
  • Loading branch information
rbuckton committed Dec 13, 2023
2 parents 6ef3aed + 68fd019 commit 2e88855
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions ReflectLite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,16 +571,8 @@ namespace Reflect {
};
}

function functionThis() {
try { return Function("return this;")(); } catch (_) { }
}

function indirectEvalThis() {
try { return (void 0, eval)("(function() { return this; })()"); } catch (_) { }
}

function sloppyModeThis() {
return functionThis() || indirectEvalThis();
function sloppyModeThis(): never {
throw new ReferenceError("globalThis could not be found. Please polyfill globalThis before loading this module.");
}
})
(function (exporter, root) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reflect-metadata",
"version": "0.2.0-pre.0",
"version": "0.2.0",
"description": "Polyfill for Metadata Reflection API",
"type": "commonjs",
"main": "Reflect.js",
Expand Down

0 comments on commit 2e88855

Please sign in to comment.