Comparing version 0.4.0 to 0.4.1
@@ -24,10 +24,9 @@ "use strict"; | ||
} | ||
if (typeof window === "undefined") { | ||
class Event { | ||
if (typeof global !== "undefined") { | ||
//@ts-ignore | ||
global.CustomEvent = global.CustomEvent || class CustomEvent1 { | ||
constructor(){ | ||
throw Error("In Node.js, only class declarations are supported, and instance creation is not supported."); | ||
} | ||
} | ||
class CustomEvent1 extends Event { | ||
} | ||
}; | ||
} | ||
@@ -34,0 +33,0 @@ class CustomEventWithDetail extends CustomEvent { |
@@ -14,10 +14,9 @@ function _define_property(obj, key, value) { | ||
} | ||
if (typeof window === "undefined") { | ||
class Event { | ||
if (typeof global !== "undefined") { | ||
//@ts-ignore | ||
global.CustomEvent = global.CustomEvent || class CustomEvent1 { | ||
constructor(){ | ||
throw Error("In Node.js, only class declarations are supported, and instance creation is not supported."); | ||
} | ||
} | ||
class CustomEvent1 extends Event { | ||
} | ||
}; | ||
} | ||
@@ -24,0 +23,0 @@ export class CustomEventWithDetail extends CustomEvent { |
{ | ||
"name": "rune-ts", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Rune Core Library", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -1,11 +0,12 @@ | ||
if (typeof window === 'undefined') { | ||
class Event { | ||
constructor() { | ||
throw Error( | ||
'In Node.js, only class declarations are supported, and instance creation is not supported.', | ||
); | ||
} | ||
} | ||
class CustomEvent extends Event {} | ||
if (typeof global !== 'undefined') { | ||
//@ts-ignore | ||
global.CustomEvent = | ||
global.CustomEvent || | ||
class CustomEvent { | ||
constructor() { | ||
throw Error( | ||
'In Node.js, only class declarations are supported, and instance creation is not supported.', | ||
); | ||
} | ||
}; | ||
} | ||
@@ -12,0 +13,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
265846