From 5bed6c53dac894f113e12c98f9cd52074b47bacd Mon Sep 17 00:00:00 2001 From: Eduardo Speroni Date: Wed, 4 May 2022 12:46:21 -0300 Subject: [PATCH] fix(core): correctly polyfill tslib --- packages/core/globals/index.ts | 4 ++-- packages/core/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/globals/index.ts b/packages/core/globals/index.ts index 1fbb60dcb..83f112d9a 100644 --- a/packages/core/globals/index.ts +++ b/packages/core/globals/index.ts @@ -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; } diff --git a/packages/core/package.json b/packages/core/package.json index 6aabe77d8..032d0fe66 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -46,7 +46,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": {