mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
fix(core): correctly polyfill tslib
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -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": {
|
||||
|
Reference in New Issue
Block a user