chore: TypeScript 5.2 with Nx 16.8.1 (#10380)

This commit is contained in:
Nathan Walker
2023-09-09 08:55:39 -07:00
committed by GitHub
parent f54ebbb2bf
commit 7c2938d2ac
28 changed files with 612 additions and 793 deletions

View File

@ -10,6 +10,7 @@ e2e
js-libs
platforms
tests
apps/**/*.xml
packages/types-android
packages/types-ios
packages/types-minimal

View File

@ -15,7 +15,7 @@
"@nativescript/ios": "~8.5.0",
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
"circular-dependency-plugin": "^5.2.2",
"typescript": "5.1.6"
"typescript": "~5.2.0"
},
"gitHead": "c06800e52ee1a184ea2dffd12a6702aaa43be4e3",
"readme": "NativeScript Application"

View File

@ -6,7 +6,7 @@ import * as TKUnit from '../tk-unit';
export * from './color-tests-common';
export function testFromIosColorWhite () {
export function testFromIosColorWhite() {
// >> color-ios-white
// Creates the white color
const color = Color.fromIosColor(UIColor.whiteColor);
@ -17,4 +17,4 @@ export function testFromIosColorWhite () {
TKUnit.assertEqual(color.b, 255, 'Color.b not properly parsed');
TKUnit.assertEqual(color.hex, '#FFFFFF', 'Color.hex not properly parsed');
TKUnit.assertEqual(color.argb, 0xffffffff, 'Color.argb not properly parsed');
};
}

View File

@ -7,9 +7,7 @@ function printDeviceInfoAndroid() {
console.log('android.os.Build.VERSION.SDK_INT = ' + android.os.Build.VERSION.SDK_INT); //android.os.Build.VERSION.SDK_INT = 19
console.log('android.os.Build.VERSION.CODENAME = ' + android.os.Build.VERSION.CODENAME); //android.os.Build.VERSION.CODENAME = REL
console.log('android.os.Build.VERSION.RELEASE = ' + android.os.Build.VERSION.RELEASE); //android.os.Build.VERSION.RELEASE = 4.4.4
var metrics: android.util.DisplayMetrics = Application.android.context
.getResources()
.getDisplayMetrics();
var metrics: android.util.DisplayMetrics = Application.android.context.getResources().getDisplayMetrics();
console.log('metrics.density = ' + metrics.density); //metrics.density = 3
console.log('metrics.scaledDensity = ' + metrics.scaledDensity); //metrics.scaledDensity = 3
console.log('metrics.densityDpi = ' + metrics.densityDpi); //metrics.densityDpi = 480
@ -22,12 +20,7 @@ function printDeviceInfoAndroid() {
console.log('config.screenWidthDp = ' + config.screenWidthDp);
console.log('config.screenHeightDp = ' + config.screenHeightDp);
console.log('config.smallestScreenWidthDp = ' + config.smallestScreenWidthDp);
console.log(
'config.orientation = ' +
(config.orientation === android.content.res.Configuration.ORIENTATION_PORTRAIT
? 'portrait'
: 'ladscape')
);
console.log('config.orientation = ' + (config.orientation === android.content.res.Configuration.ORIENTATION_PORTRAIT ? 'portrait' : 'ladscape'));
}
function printDeviceInfoIOS() {
@ -41,12 +34,7 @@ function printDeviceInfoIOS() {
console.log('device.batteryLevel = ' + device.batteryLevel); //device.batteryLevel = -1
var screen = UIScreen.mainScreen;
console.log('screen = ' + screen);
console.log(
'screen.nativeBounds = ' +
screen.nativeBounds.size.width +
', ' +
screen.nativeBounds.size.height
); //screen.nativeBounds = 640, 1136
console.log('screen.nativeBounds = ' + screen.nativeBounds.size.width + ', ' + screen.nativeBounds.size.height); //screen.nativeBounds = 640, 1136
console.log('screen.scale = ' + screen.scale); //screen.scale = 2
console.log('screen.nativeScale = ' + screen.nativeScale); //screen.nativeScale = 2
}
@ -58,19 +46,11 @@ function printTNSInfo() {
console.log('platform.Device.sdkVersion = ' + platform.Device.sdkVersion);
console.log('platform.Device.deviceType = ' + platform.Device.deviceType);
console.log(
'platform.Screen.mainScreen.widthDIPs = ' + platform.Screen.mainScreen.widthDIPs
);
console.log(
'platform.Screen.mainScreen.heightDIPs = ' + platform.Screen.mainScreen.heightDIPs
);
console.log('platform.Screen.mainScreen.widthDIPs = ' + platform.Screen.mainScreen.widthDIPs);
console.log('platform.Screen.mainScreen.heightDIPs = ' + platform.Screen.mainScreen.heightDIPs);
console.log('platform.Screen.mainScreen.scale = ' + platform.Screen.mainScreen.scale);
console.log(
'platform.Screen.mainScreen.widthPixels = ' + platform.Screen.mainScreen.widthPixels
);
console.log(
'platform.Screen.mainScreen.heightPixels = ' + platform.Screen.mainScreen.heightPixels
);
console.log('platform.Screen.mainScreen.widthPixels = ' + platform.Screen.mainScreen.widthPixels);
console.log('platform.Screen.mainScreen.heightPixels = ' + platform.Screen.mainScreen.heightPixels);
}
function print() {

View File

@ -4,7 +4,6 @@ import { unsetValue } from '@nativescript/core/ui/core/view';
import { PercentLength } from '@nativescript/core/ui/styling/style-properties';
export * from './frame-tests-common';
export function test_percent_width_and_height_set_to_page_support() {
let topFrame = Frame.topmost();
let currentPage = topFrame.currentPage;

View File

@ -5,6 +5,6 @@
<meta charset="utf-8" />
</head>
<body>
<span style="color: red;">TestÖ with Spaces</span>
<span style="color: red">TestÖ with Spaces</span>
</body>
</html>

View File

@ -6,6 +6,6 @@
</head>
<body>
<span style="color: red;">TestÖ</span>
<span style="color: red">TestÖ</span>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,6 @@
"@nativescript/android": "~8.5.0",
"@nativescript/ios": "~8.5.0",
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
"typescript": "5.1.6"
"typescript": "~5.2.0"
}
}

View File

@ -14,7 +14,7 @@
"@nativescript/android": "~8.5.0",
"@nativescript/ios": "~8.5.0",
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
"typescript": "5.1.6"
"typescript": "~5.2.0"
},
"gitHead": "8ab7726d1ee9991706069c1359c552e67ee0d1a4",
"readme": "NativeScript Application",

View File

@ -28,9 +28,18 @@ export function select(args) {
let whenSelected = (handler) => (args) => lastSelection && handler(args);
let setProperty = (setter) => (value) => setter(lastSelection, value);
let intHandler = (handler) => ({ object }) => handler(parseInt(object.text));
let stringHandler = (handler) => ({ object }) => handler(object.text);
let booleanHandler = (handler) => ({ object }) => handler(object.text === 'true');
let intHandler =
(handler) =>
({ object }) =>
handler(parseInt(object.text));
let stringHandler =
(handler) =>
({ object }) =>
handler(object.text);
let booleanHandler =
(handler) =>
({ object }) =>
handler(object.text === 'true');
export const order = whenSelected(intHandler(setProperty(FlexboxLayout.setOrder)));
export const flexGrow = whenSelected(intHandler(setProperty(FlexboxLayout.setFlexGrow)));

View File

@ -7,7 +7,7 @@
<body>
<h3>Result</h3>
<div style="color: green;" id="result">No value yet</div>
<div style="color: green" id="result">No value yet</div>
<script type="text/javascript" charset="utf-8">
function getParameterByName(name) {
url = window.location.href;

View File

@ -7,6 +7,6 @@
</head>
<body>
<span style="color: red;">Test</span>
<span style="color: red">Test</span>
</body>
</html>

View File

@ -1,124 +0,0 @@
{
"migrations": [
{
"cli": "nx",
"version": "16.0.0-beta.0",
"description": "Remove @nrwl/cli.",
"implementation": "./src/migrations/update-16-0-0/remove-nrwl-cli",
"package": "nx",
"name": "16.0.0-remove-nrwl-cli"
},
{
"cli": "nx",
"version": "16.0.0-beta.9",
"description": "Replace `dependsOn.projects` and `inputs` definitions with new configuration format.",
"implementation": "./src/migrations/update-16-0-0/update-depends-on-to-tokens",
"package": "nx",
"name": "16.0.0-tokens-for-depends-on"
},
{
"cli": "nx",
"version": "16.0.0-beta.0",
"description": "Replace @nrwl/nx-cloud with nx-cloud",
"implementation": "./src/migrations/update-16-0-0/update-nx-cloud-runner",
"package": "nx",
"name": "16.0.0-update-nx-cloud-runner"
},
{
"cli": "nx",
"version": "16.2.0-beta.0",
"description": "Remove outputPath from run commands",
"implementation": "./src/migrations/update-16-2-0/remove-run-commands-output-path",
"package": "nx",
"name": "16.2.0-remove-output-path-from-run-commands"
},
{
"cli": "nx",
"version": "16.6.0-beta.6",
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
"implementation": "./src/migrations/update-15-0-0/prefix-outputs",
"package": "nx",
"name": "16.6.0-prefix-outputs"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/workspace with @nx/workspace",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/workspace",
"name": "update-16-0-0-add-nx-packages"
},
{
"version": "16.0.0-beta.4",
"description": "Generates a plugin called 'workspace-plugin' containing your workspace generators.",
"cli": "nx",
"implementation": "./src/migrations/update-16-0-0/move-workspace-generators-to-local-plugin",
"package": "@nx/workspace",
"name": "16-0-0-move-workspace-generators-into-local-plugin"
},
{
"version": "16.0.0-beta.9",
"description": "Fix .babelrc presets if it contains an invalid entry for @nx/web/babel.",
"cli": "nx",
"implementation": "./src/migrations/update-16-0-0/fix-invalid-babelrc",
"package": "@nx/workspace",
"name": "16-0-0-fix-invalid-babelrc"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/eslint-plugin with @nx/eslint-plugin",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/eslint-plugin",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/node with @nx/node",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/node",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.5",
"description": "Replace @nx/node:webpack with @nx/node:webpack",
"implementation": "./src/migrations/update-16-0-0/update-webpack-executor",
"package": "@nx/node",
"name": "update-16-0-0-update-executor"
},
{
"cli": "nx",
"version": "16.3.1-beta.0",
"description": "Replace @nx/node:webpack and @nx/node:webpack with @nx/webpack:webpack for all project targets",
"implementation": "./src/migrations/update-16-3-1/update-webpack-executor",
"package": "@nx/node",
"name": "update-16-3-1-update-executor"
},
{
"cli": "nx",
"version": "16.4.0-beta.8",
"description": "Replace @nx/node:node with @nx/js:node for all project targets",
"implementation": "./src/migrations/update-16-4-0/replace-node-executor",
"package": "@nx/node",
"name": "update-16-4-0-replace-node-executor"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/jest with @nx/jest",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/jest",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.5.0-beta.2",
"description": "Add test-setup.ts to ignored files in production input",
"implementation": "./src/migrations/update-16-5-0/add-test-setup-to-inputs-ignore",
"package": "@nx/jest",
"name": "add-test-setup-to-inputs-ignore"
}
]
}

View File

@ -18,45 +18,47 @@
"url": "https://github.com/NativeScript/NativeScript.git"
},
"dependencies": {
"@nx/devkit": "16.6.0",
"@nx/devkit": "16.8.1",
"@swc/helpers": "~0.5.0",
"nativescript-theme-core": "^1.0.4",
"nx-cloud": "16.3.0"
"nx-cloud": "16.4.0"
},
"devDependencies": {
"@nativescript/hook": "^2.0.0",
"@nativescript/nx": "^16.5.0",
"@nstudio/focus": "^16.5.0",
"@nstudio/nps-i": "~2.0.0",
"@nx/jest": "16.6.0",
"@nx/js": "16.6.0",
"@nx/plugin": "16.6.0",
"@nx/workspace": "16.6.0",
"@nx/eslint-plugin": "16.8.1",
"@nx/jest": "16.8.1",
"@nx/js": "16.8.1",
"@nx/node": "16.8.1",
"@nx/plugin": "16.8.1",
"@nx/workspace": "16.8.1",
"@prettier/plugin-xml": "^2.2.0",
"@swc-node/register": "~1.4.2",
"@swc/cli": "~0.1.62",
"@swc/core": "~1.3.51",
"@types/jest": "~29.5.0",
"@types/node": "^18.7.1",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"conventional-changelog-cli": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"conventional-changelog-cli": "^4.1.0",
"copyfiles": "^2.4.0",
"css": "^3.0.0",
"css-tree": "^1.1.2",
"dotenv": "10.0.0",
"dotenv": "~16.3.1",
"emoji-regex": "^10.2.1",
"eslint": "7.22.0",
"eslint-config-prettier": "^8.1.0",
"eslint": "~8.43.0",
"eslint-config-prettier": "~8.8.0",
"gonzales": "^1.0.7",
"husky": "^8.0.1",
"jest": "~29.5.0",
"jest-environment-jsdom": "^29.4.1",
"lint-staged": "^13.2.0",
"jest": "~29.6.0",
"jest-environment-jsdom": "~29.6.0",
"lint-staged": "^14.0.0",
"module-alias": "^2.2.2",
"nativescript": "~8.5.0",
"nativescript-typedoc-theme": "1.1.0",
"nx": "16.6.0",
"nx": "16.8.1",
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
"parserlib": "^1.1.1",
"prettier": "^2.6.2",
@ -69,14 +71,12 @@
"ts-patch": "^3.0.0",
"tslib": "^2.6.0",
"typedoc": "^0.24.8",
"typescript": "5.1.6",
"zx": "^7.0.5",
"@nx/eslint-plugin": "16.6.0",
"@nx/node": "16.6.0"
"typescript": "~5.2.0",
"zx": "^7.0.5"
},
"lint-staged": {
"**/*": [
"nx format:write --files"
"**/*.{js,ts,css,scss,json,html}": [
"npx prettier --write"
]
}
}

View File

@ -1,4 +1,4 @@
import AbortSignal, { abortSignal, createAbortSignal } from "./abortsignal"
import AbortSignal, { abortSignal, createAbortSignal } from './abortsignal';
/**
* The AbortController.
* @see https://dom.spec.whatwg.org/#abortcontroller
@ -8,55 +8,51 @@ export default class AbortController {
* Initialize this controller.
*/
public constructor() {
signals.set(this, createAbortSignal())
signals.set(this, createAbortSignal());
}
/**
* Returns the `AbortSignal` object associated with this object.
*/
public get signal(): AbortSignal {
return getSignal(this)
return getSignal(this);
}
/**
* Abort and signal to any observers that the associated activity is to be aborted.
*/
public abort(): void {
abortSignal(getSignal(this))
abortSignal(getSignal(this));
}
}
/**
* Associated signals.
*/
const signals = new WeakMap<AbortController, AbortSignal>()
const signals = new WeakMap<AbortController, AbortSignal>();
/**
* Get the associated signal of a given controller.
*/
function getSignal(controller: AbortController): AbortSignal {
const signal = signals.get(controller)
const signal = signals.get(controller);
if (signal == null) {
throw new TypeError(
`Expected 'this' to be an 'AbortController' object, but got ${
controller === null ? "null" : typeof controller
}`,
)
throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? 'null' : typeof controller}`);
}
return signal
return signal;
}
// Properties should be enumerable.
Object.defineProperties(AbortController.prototype, {
signal: { enumerable: true },
abort: { enumerable: true },
})
});
if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") {
if (typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol') {
Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {
configurable: true,
value: "AbortController",
})
value: 'AbortController',
});
}
export { AbortController, AbortSignal }
export { AbortController, AbortSignal };

View File

@ -128,7 +128,7 @@ export const on = Application.on.bind(Application);
* Application.orientation()
* ```
*/
export const orientation = Application.orientation.bind(Application)
export const orientation = Application.orientation.bind(Application);
/**
* @deprecated Deep imports into the Application module are deprecated and will be removed in a future release.

View File

@ -1,4 +1,3 @@
export interface Stylesheet {
rules: Rule[];
}
@ -124,7 +123,7 @@ export class CSS3Parser {
private reconsumedInputToken: InputToken;
private topLevelFlag: boolean;
constructor(private text: string) { }
constructor(private text: string) {}
/**
* For testing purposes.

View File

@ -50,7 +50,7 @@ export class CSSNativeScript {
};
}
private ruleBlockToDeclarations(declarationsInputTokens: InputToken[]): { type: 'declaration'; property: string; value: string; }[] {
private ruleBlockToDeclarations(declarationsInputTokens: InputToken[]): { type: 'declaration'; property: string; value: string }[] {
// return <any>declarationsInputTokens;
const declarations: {
type: 'declaration';

View File

@ -40,9 +40,7 @@ export namespace HeapDomain {
// Stop tracking heap changes. This will produce a `trackingComplete` event.
stopTracking(): void;
// Returns a preview (string, Debugger.FunctionDetails, or Runtime.ObjectPreview) for a Heap.HeapObjectId.
getPreview(
params: GetPreviewMethodArguments
): {
getPreview(params: GetPreviewMethodArguments): {
string?: string;
functionDetails?: DebuggerDomain.FunctionDetails;
preview?: RuntimeDomain.ObjectPreview;
@ -315,9 +313,7 @@ export namespace DebuggerDomain {
// Set pause on assertions state. Assertions are console.assert assertions.
setPauseOnAssertions(params: SetPauseOnAssertionsMethodArguments): void;
// Evaluates expression on a given call frame.
evaluateOnCallFrame(
params: EvaluateOnCallFrameMethodArguments
): {
evaluateOnCallFrame(params: EvaluateOnCallFrameMethodArguments): {
result: RuntimeDomain.RemoteObject;
wasThrown?: boolean;
savedResultIndex?: number;
@ -710,9 +706,7 @@ export namespace RuntimeDomain {
// Parses JavaScript source code for errors.
parse(params: ParseMethodArguments): { result: SyntaxErrorType; message?: string; range?: ErrorRange };
// Evaluates expression on global object.
evaluate(
params: EvaluateMethodArguments
): {
evaluate(params: EvaluateMethodArguments): {
result: RemoteObject;
wasThrown?: boolean;
savedResultIndex?: number;
@ -720,16 +714,12 @@ export namespace RuntimeDomain {
// Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
callFunctionOn(params: CallFunctionOnMethodArguments): { result: RemoteObject; wasThrown?: boolean };
// Returns properties of a given object. Object group of the result is inherited from the target object.
getProperties(
params: GetPropertiesMethodArguments
): {
getProperties(params: GetPropertiesMethodArguments): {
result: PropertyDescriptor[];
internalProperties?: InternalPropertyDescriptor[];
};
// Returns displayable properties of a given object. Object group of the result is inherited from the target object. Displayable properties are own properties, internal properties, and native getters in the prototype chain (assumed to be bindings and treated like own properties for the frontend).
getDisplayableProperties(
params: GetDisplayablePropertiesMethodArguments
): {
getDisplayableProperties(params: GetDisplayablePropertiesMethodArguments): {
properties: PropertyDescriptor[];
internalProperties?: InternalPropertyDescriptor[];
};
@ -2114,9 +2104,7 @@ export namespace CSSDomain {
// Disables the CSS agent for the given page.
disable(): void;
// Returns requested styles for a DOM node identified by <code>nodeId</code>.
getMatchedStylesForNode(
params: GetMatchedStylesForNodeMethodArguments
): {
getMatchedStylesForNode(params: GetMatchedStylesForNodeMethodArguments): {
inlineStyle?: CSSStyle;
attributesStyle?: CSSStyle;
matchedCSSRules?: RuleMatch[];

View File

@ -46,9 +46,7 @@ export class CSSDomainDebugger implements inspectorCommandTypes.CSSDomain.CSSDom
this._enabled = false;
}
getMatchedStylesForNode(
params: inspectorCommandTypes.CSSDomain.GetMatchedStylesForNodeMethodArguments
): {
getMatchedStylesForNode(params: inspectorCommandTypes.CSSDomain.GetMatchedStylesForNodeMethodArguments): {
inlineStyle?: inspectorCommandTypes.CSSDomain.CSSStyle;
attributesStyle?: inspectorCommandTypes.CSSDomain.CSSStyle;
matchedCSSRules?: inspectorCommandTypes.CSSDomain.RuleMatch[];
@ -59,18 +57,14 @@ export class CSSDomainDebugger implements inspectorCommandTypes.CSSDomain.CSSDom
return {};
}
// Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by <code>nodeId</code>.
getInlineStylesForNode(
params: inspectorCommandTypes.CSSDomain.GetInlineStylesForNodeMethodArguments
): {
getInlineStylesForNode(params: inspectorCommandTypes.CSSDomain.GetInlineStylesForNodeMethodArguments): {
inlineStyle?: inspectorCommandTypes.CSSDomain.CSSStyle;
attributesStyle?: inspectorCommandTypes.CSSDomain.CSSStyle;
} {
return {};
}
// Returns the computed style for a DOM node identified by <code>nodeId</code>.
getComputedStyleForNode(
params: inspectorCommandTypes.CSSDomain.GetComputedStyleForNodeMethodArguments
): {
getComputedStyleForNode(params: inspectorCommandTypes.CSSDomain.GetComputedStyleForNodeMethodArguments): {
computedStyle: inspectorCommandTypes.CSSDomain.CSSComputedStyleProperty[];
} {
return {

View File

@ -54,20 +54,20 @@
"webpack-virtual-modules": "^0.4.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.1.0",
"@angular-devkit/build-angular": "^16.2.0",
"@types/css": "0.0.33",
"@types/jest": "29.5.2",
"@types/jest": "29.5.4",
"@types/loader-utils": "2.0.3",
"@types/lodash.get": "4.4.7",
"@types/micromatch": "4.0.2",
"@types/sax": "1.2.4",
"@types/terser-webpack-plugin": "5.2.0",
"@types/webpack-virtual-modules": "0.1.1",
"jest": "29.5.0",
"jest-matcher-utils": "29.4.1",
"jest": "~29.6.4",
"jest-matcher-utils": "~29.6.4",
"nativescript-vue-template-compiler": "2.9.3",
"ts-jest": "29.1.0",
"typescript": "5.1.6"
"ts-jest": "29.1.1",
"typescript": "~5.2.0"
},
"peerDependencies": {
"nativescript-vue-template-compiler": "^2.8.1"

View File

@ -21,12 +21,12 @@ WorkerDependency.Template.prototype.apply = function apply(
) {
const { chunkGraph, moduleGraph, runtimeRequirements } = templateContext;
const dep = /** @type {WorkerDependency} */ dependency;
const block = /** @type {AsyncDependenciesBlock} */ moduleGraph.getParentBlock(
const block =
/** @type {AsyncDependenciesBlock} */ moduleGraph.getParentBlock(
dependency
);
const entrypoint = /** @type {Entrypoint} */ chunkGraph.getBlockChunkGroup(
block
);
const entrypoint =
/** @type {Entrypoint} */ chunkGraph.getBlockChunkGroup(block);
const chunk = entrypoint.getEntrypointChunk();
// runtimeRequirements.add(RuntimeGlobals.publicPath);

View File

@ -3,9 +3,9 @@
**/
{
"compilerOptions": {
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"strict": true, /* Enable all strict type-checking options. */
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"strict": true /* Enable all strict type-checking options. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
}
}

View File

@ -1,7 +1,5 @@
{
"rulesDirectory": [
"@nativescript/tslint-rules"
],
"rulesDirectory": ["@nativescript/tslint-rules"],
"rules": {
"arrow-return-shorthand": true,
"class-name": true,
@ -27,25 +25,14 @@
"no-unused-expression": true,
"no-use-before-declare": false,
"no-var-requires": false,
"one-line": [false,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"one-line": [false, "check-open-brace", "check-catch", "check-else", "check-whitespace"],
"quotemark": [true, "double"],
"radix": false,
"semicolon": true,
"triple-equals": [true, "allow-null-check"],
"typedef": [false,
"callSignature",
"indexSignature",
"parameter",
"propertySignature",
"variableDeclarator",
"memberVariableDeclarator"
],
"typedef-whitespace": [true,
"typedef": [false, "callSignature", "indexSignature", "parameter", "propertySignature", "variableDeclarator", "memberVariableDeclarator"],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
@ -62,16 +49,6 @@
}
],
"variable-name": [false, "allow-leading-underscore"],
"whitespace": [true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-rest-spread",
"check-type",
"check-type-operator",
"check-preblock"
]
"whitespace": [true, "check-branch", "check-decl", "check-operator", "check-module", "check-separator", "check-rest-spread", "check-type", "check-type-operator", "check-preblock"]
}
}