emscripten-library-decorator
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -9,3 +9,3 @@ /** Allow decorators to call eval() in the context that called them. | ||
} | ||
export declare function __extends(Class: ClassType, Parent: ClassType): any; | ||
export declare function __extends(Class: ClassType, Parent: ClassType): void; | ||
/** @dep decorator. | ||
@@ -12,0 +12,0 @@ * Apply to a function, to list other required variables needing protection |
@@ -14,9 +14,9 @@ // This file is part of emscripten-library-decorator, | ||
function __extends(Class, Parent) { | ||
for (var key in Parent) | ||
if (Parent.hasOwnProperty(key)) | ||
Class[key] = Parent[key]; | ||
// tslint:disable-next-line:no-invalid-this | ||
function Base() { this.constructor = Class; } | ||
Base.prototype = Parent.prototype; | ||
for (var key in Parent) | ||
if (Parent.hasOwnProperty(key)) | ||
Class[key] = Parent[key]; | ||
return (new Base()); | ||
Class.prototype = new Base(); | ||
} | ||
@@ -23,0 +23,0 @@ exports.__extends = __extends; |
{ | ||
"name": "emscripten-library-decorator", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Decorators for writing Emscripten libraries", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
15969