Преглед на файлове

make subclasses more compatible with CoffeeScript

Adam Shaw преди 8 години
родител
ревизия
9d574d5d93
променени са 1 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 7 2
      src/tslib-lite.js

+ 7 - 2
src/tslib-lite.js

@@ -6,8 +6,13 @@ https://github.com/Microsoft/tslib/blob/v1.6.0/tslib.js
 only include the helpers we need, to keep down filesize
 */
 
-var extendStatics = Object.setPrototypeOf ||
-	({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+var extendStatics =
+	/* NOTE: tslib's as-is method is not compatible with how CoffeeScript does subclasses.
+	 * When CoffeeScript is stripped out, can revert.
+	 *
+	 * Object.setPrototypeOf ||
+	 * ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+	 */
 	function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
 
 exports.__extends = function (d, b) {