mirror of https://github.com/espruino/BangleApps
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]:pull/2596/head380af9c600/tsconfig.json (L4-L4)
[here]:380af9c600/apps/btadv/app.ts (L235)
parent
380af9c600
commit
2b39b1e285
|
@ -1,15 +1,5 @@
|
|||
"use strict";
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__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 __assign = Object.assign;
|
||||
var Layout = require("Layout");
|
||||
Bangle.loadWidgets();
|
||||
Bangle.drawWidgets();
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// ts helpers:
|
||||
const __assign = Object.assign;
|
||||
|
||||
const Layout = require("Layout") as Layout_.Layout;
|
||||
|
||||
Bangle.loadWidgets();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"removeComments": true,
|
||||
|
||||
"newLine": "lf",
|
||||
"noEmitHelpers": false,
|
||||
"noEmitHelpers": true, // we link to specific banglejs implementations
|
||||
"noEmitOnError": false,
|
||||
"preserveConstEnums": false,
|
||||
"importsNotUsedAsValues": "error",
|
||||
|
|
Loading…
Reference in New Issue