Skip to content

Commit 2e88855

Browse files
authored
Merge pull request #150 from rbuckton/release-0.2
Update main to v0.2 release.
2 parents 6ef3aed + 68fd019 commit 2e88855

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

ReflectLite.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -571,16 +571,8 @@ namespace Reflect {
571571
};
572572
}
573573

574-
function functionThis() {
575-
try { return Function("return this;")(); } catch (_) { }
576-
}
577-
578-
function indirectEvalThis() {
579-
try { return (void 0, eval)("(function() { return this; })()"); } catch (_) { }
580-
}
581-
582-
function sloppyModeThis() {
583-
return functionThis() || indirectEvalThis();
574+
function sloppyModeThis(): never {
575+
throw new ReferenceError("globalThis could not be found. Please polyfill globalThis before loading this module.");
584576
}
585577
})
586578
(function (exporter, root) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reflect-metadata",
3-
"version": "0.2.0-pre.0",
3+
"version": "0.2.0",
44
"description": "Polyfill for Metadata Reflection API",
55
"type": "commonjs",
66
"main": "Reflect.js",

0 commit comments

Comments
 (0)