mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-19 16:43:34 -04:00
!1057 数组包含09编译报错
Merge pull request !1057 from laibo102/OpenHarmony-3.1-Release
This commit is contained in:
@@ -59,7 +59,8 @@ struct Animation {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class Animation extends View {
|
||||
`"use strict";
|
||||
class Animation extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.bgColor = "#8888ff";
|
||||
|
||||
@@ -29,7 +29,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.test = 'Hello';
|
||||
|
||||
@@ -38,7 +38,8 @@ struct Banner {
|
||||
}
|
||||
`
|
||||
exports.expectResult =
|
||||
`class Banner extends View {
|
||||
`"use strict";
|
||||
class Banner extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.updateWithValueParams(params);
|
||||
|
||||
@@ -54,7 +54,8 @@ struct CustomContainerUser {
|
||||
}
|
||||
`
|
||||
exports.expectResult =
|
||||
`class CustomContainer extends View {
|
||||
`"use strict";
|
||||
class CustomContainer extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.header = "";
|
||||
|
||||
@@ -54,7 +54,8 @@ struct CustomContainerUser {
|
||||
}
|
||||
`
|
||||
exports.expectResult =
|
||||
`class CustomContainer extends View {
|
||||
`"use strict";
|
||||
class CustomContainer extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.header = "";
|
||||
|
||||
@@ -31,7 +31,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.value1 = "hello world 1";
|
||||
|
||||
@@ -44,7 +44,8 @@ struct Child {
|
||||
`
|
||||
|
||||
exports.expectResult =
|
||||
`class Parent extends View {
|
||||
`"use strict";
|
||||
class Parent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.regularToState = 'regularToState';
|
||||
|
||||
@@ -68,7 +68,8 @@ struct Banner {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class HomeComponent extends View {
|
||||
`"use strict";
|
||||
class HomeComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.value1 = "1";
|
||||
|
||||
@@ -31,7 +31,8 @@ struct MyLinkComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyLinkComponent extends View {
|
||||
`"use strict";
|
||||
class MyLinkComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__myLink1 = new SynchedPropertyObjectTwoWay(params.myLink1, this, "myLink1");
|
||||
|
||||
@@ -55,7 +55,8 @@ struct ViewB {
|
||||
`
|
||||
|
||||
exports.expectResult =
|
||||
`var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
`"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
|
||||
@@ -31,7 +31,8 @@ struct MyPropComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyPropComponent extends View {
|
||||
`"use strict";
|
||||
class MyPropComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__myProp2 = new SynchedPropertySimpleOneWay(params.myProp2, this, "myProp2");
|
||||
|
||||
@@ -43,7 +43,8 @@ struct Parent {
|
||||
`
|
||||
|
||||
exports.expectResult =
|
||||
`class GrandChild extends View {
|
||||
`"use strict";
|
||||
class GrandChild extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__arr = this.initializeConsume("arr", "arr");
|
||||
|
||||
@@ -36,7 +36,8 @@ struct MyStateComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class DataModel {
|
||||
`"use strict";
|
||||
class DataModel {
|
||||
constructor() {
|
||||
this.myData1 = 0;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,8 @@ struct CustomDialogUser {
|
||||
`
|
||||
|
||||
exports.expectResult =
|
||||
`class DialogExample extends View {
|
||||
`"use strict";
|
||||
class DialogExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.controller = undefined;
|
||||
|
||||
@@ -61,7 +61,8 @@ struct MyComponent {
|
||||
`
|
||||
|
||||
exports.expectResult =
|
||||
`class CustomDialogSample extends View {
|
||||
`"use strict";
|
||||
class CustomDialogSample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__title = new SynchedPropertySimpleTwoWay(params.title, this, "title");
|
||||
|
||||
@@ -70,7 +70,8 @@ struct CompA {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class CompA extends View {
|
||||
`"use strict";
|
||||
class CompA extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.size = 100;
|
||||
|
||||
@@ -44,7 +44,8 @@ struct FancyText {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`function __Text__fancy(color) {
|
||||
`"use strict";
|
||||
function __Text__fancy(color) {
|
||||
Text.backgroundColor(color);
|
||||
}
|
||||
function __Text__superFancy(size) {
|
||||
|
||||
@@ -68,7 +68,8 @@ struct HomeComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class HomeComponent extends View {
|
||||
`"use strict";
|
||||
class HomeComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.value1 = "hello world 1";
|
||||
|
||||
@@ -67,7 +67,8 @@ struct BasketModifier {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class PurchaseItem {
|
||||
`"use strict";
|
||||
class PurchaseItem {
|
||||
constructor(price) {
|
||||
this.id = PurchaseItem.NextId++;
|
||||
this.price = price;
|
||||
|
||||
@@ -48,7 +48,8 @@ struct DialogView {
|
||||
`
|
||||
|
||||
exports.expectResult =
|
||||
`class ListComponent extends View {
|
||||
`"use strict";
|
||||
class ListComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__dialogVis = new ObservedPropertySimple(false, this, "dialogVis");
|
||||
|
||||
@@ -31,7 +31,8 @@ struct GeometryReaderTest {
|
||||
`
|
||||
|
||||
exports.expectResult =
|
||||
`class GeometryReaderTest extends View {
|
||||
`"use strict";
|
||||
class GeometryReaderTest extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.updateWithValueParams(params);
|
||||
|
||||
@@ -111,7 +111,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`var router = globalThis.requireNativeModule('system.router');
|
||||
`"use strict";
|
||||
var router = globalThis.requireNativeModule('system.router');
|
||||
var app = globalThis.requireNativeModule('system.app');
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
|
||||
@@ -51,7 +51,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`var router = globalThis.requireNativeModule('system.router');
|
||||
`"use strict";
|
||||
var router = globalThis.requireNativeModule('system.router');
|
||||
var app = globalThis.requireNativeModule('system.app');
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
|
||||
@@ -52,7 +52,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`var router = globalThis.requireNativeModule('system.router');
|
||||
`"use strict";
|
||||
var router = globalThis.requireNativeModule('system.router');
|
||||
var app = globalThis.requireNativeModule('system.app');
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
|
||||
@@ -87,7 +87,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.updateWithValueParams(params);
|
||||
|
||||
@@ -37,7 +37,8 @@ import world = require('libworld.so')
|
||||
`
|
||||
|
||||
exports.expectResult =
|
||||
`var { router1, router2 } = globalThis.requireNativeModule('system.router');
|
||||
`"use strict";
|
||||
var { router1, router2 } = globalThis.requireNativeModule('system.router');
|
||||
var { app } = globalThis.requireNativeModule('system.router');
|
||||
var { fetch } = isSystemplugin('fetch', 'system') ? globalThis.systemplugin.fetch : globalThis.requireNapi('fetch');
|
||||
var { router1, router2, router3 } = globalThis.requireNativeModule('system.router');
|
||||
|
||||
@@ -52,7 +52,8 @@ struct LinkTest {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyLinkTestComponent extends View {
|
||||
`"use strict";
|
||||
class MyLinkTestComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__myLink1 = new SynchedPropertyObjectTwoWay(params.myLink1, this, "myLink1");
|
||||
|
||||
@@ -57,7 +57,8 @@ struct HomePreviewComponent_Preview {
|
||||
`
|
||||
|
||||
exports.expectResult =
|
||||
`class HomePreviewComponent extends View {
|
||||
`"use strict";
|
||||
class HomePreviewComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.value1 = "hello world 1";
|
||||
|
||||
@@ -35,7 +35,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.test = 'Hello';
|
||||
|
||||
@@ -32,7 +32,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.test = 'Hello';
|
||||
|
||||
@@ -41,7 +41,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.updateWithValueParams(params);
|
||||
|
||||
@@ -33,7 +33,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.test = 'Hello';
|
||||
|
||||
@@ -66,7 +66,8 @@ struct Calendar {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`// class without @Component convert tool will not process.
|
||||
`"use strict";
|
||||
// class without @Component convert tool will not process.
|
||||
class Month {
|
||||
constructor(year, month, days) {
|
||||
this.year = 2010; // why add assignment here, TS grammar required, if not it will omit by TSC.
|
||||
|
||||
@@ -40,7 +40,8 @@ struct MyComponent2 {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent2 extends View {
|
||||
`"use strict";
|
||||
class MyComponent2 extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__arr = new ObservedPropertyObject([10, 20, 30], this, "arr");
|
||||
|
||||
@@ -77,7 +77,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.test = 'Hello';
|
||||
|
||||
@@ -50,7 +50,8 @@ struct HomeComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class HomeComponent extends View {
|
||||
`"use strict";
|
||||
class HomeComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.value1 = "hello world 1";
|
||||
|
||||
@@ -22,7 +22,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.updateWithValueParams(params);
|
||||
|
||||
@@ -20,7 +20,8 @@ struct MyComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class MyComponent extends View {
|
||||
`"use strict";
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.updateWithValueParams(params);
|
||||
|
||||
@@ -57,7 +57,8 @@ struct HomeComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`const value5 = [true, false];
|
||||
`"use strict";
|
||||
const value5 = [true, false];
|
||||
let value6 = { item1: true };
|
||||
class HomeComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
|
||||
@@ -46,7 +46,8 @@ struct HomeComponent {
|
||||
}`
|
||||
|
||||
exports.expectResult =
|
||||
`class HomeComponent extends View {
|
||||
`"use strict";
|
||||
class HomeComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__scale = new ObservedPropertySimple(1, this, "scale");
|
||||
|
||||
@@ -551,7 +551,8 @@
|
||||
"typeRoots": [],
|
||||
"lib": [
|
||||
"es2020"
|
||||
]
|
||||
],
|
||||
"alwaysStrict": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
|
||||
Reference in New Issue
Block a user