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": {