btadv: manually setup TS helpers - use Object.assign()
Currently we have `tsc` [generate code for es5], because we don't yet have es6 destructuring support in JSV (used [here], for example). As a follow on from #2587, this disables the TS poiyfill and points it at our `Object.assign`, so we benefit from these new features, while still keeping the target at es5. [generate code for es5]:master380af9c600/tsconfig.json (L4-L4)[here]:380af9c600/apps/btadv/app.ts (L235)
parent
380af9c600
commit
2b39b1e285
|
|
@ -1,15 +1,5 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
var __assign = (this && this.__assign) || function () {
|
var __assign = Object.assign;
|
||||||
__assign = Object.assign || function(t) {
|
|
||||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
||||||
s = arguments[i];
|
|
||||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
||||||
t[p] = s[p];
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
};
|
|
||||||
return __assign.apply(this, arguments);
|
|
||||||
};
|
|
||||||
var Layout = require("Layout");
|
var Layout = require("Layout");
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// ts helpers:
|
||||||
|
const __assign = Object.assign;
|
||||||
|
|
||||||
const Layout = require("Layout") as Layout_.Layout;
|
const Layout = require("Layout") as Layout_.Layout;
|
||||||
|
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
|
|
||||||
"newLine": "lf",
|
"newLine": "lf",
|
||||||
"noEmitHelpers": false,
|
"noEmitHelpers": true, // we link to specific banglejs implementations
|
||||||
"noEmitOnError": false,
|
"noEmitOnError": false,
|
||||||
"preserveConstEnums": false,
|
"preserveConstEnums": false,
|
||||||
"importsNotUsedAsValues": "error",
|
"importsNotUsedAsValues": "error",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue