1
0
Fork 0

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]: 380af9c600/tsconfig.json (L4-L4)
[here]: 380af9c600/apps/btadv/app.ts (L235)
master
Rob Pilling 2023-02-22 22:19:20 +00:00
parent 380af9c600
commit 2b39b1e285
3 changed files with 5 additions and 12 deletions

View File

@ -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();

View File

@ -1,3 +1,6 @@
// ts helpers:
const __assign = Object.assign;
const Layout = require("Layout") as Layout_.Layout;
Bangle.loadWidgets();

View File

@ -13,7 +13,7 @@
"removeComments": true,
"newLine": "lf",
"noEmitHelpers": false,
"noEmitHelpers": true, // we link to specific banglejs implementations
"noEmitOnError": false,
"preserveConstEnums": false,
"importsNotUsedAsValues": "error",