fix(core): correctly polyfill tslib (#9894)

Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
This commit is contained in:
Eduardo Speroni
2022-07-16 18:29:30 -03:00
committed by GitHub
parent 24333a42f1
commit 20efd3605e
2 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
import * as tslibType from 'tslib';
import type * as tslibType from 'tslib';
const tslib: typeof tslibType = require('tslib');
import { Observable } from '../data/observable';
import { trace as profilingTrace, time, uptime, level as profilingLevel } from '../profiling';
@@ -132,7 +132,7 @@ export function initGlobal() {
// Bind the tslib helpers to global scope.
// This is needed when we don't use importHelpers, which
// breaks extending native-classes
for (const fnName of Object.keys(tslib)) {
for (const fnName of Object.getOwnPropertyNames(tslib)) {
if (typeof tslib[fnName] !== 'function') {
continue;
}

View File

@@ -48,7 +48,7 @@
"acorn": "^8.7.0",
"css-tree": "^1.1.2",
"reduce-css-calc": "^2.1.7",
"tslib": "~2.0.0"
"tslib": "^2.0.0"
},
"nativescript": {
"platforms": {