chore: TypeScript 5.1 with Nx 16.6 migrations (#10338)

This commit is contained in:
Nathan Walker
2023-08-11 07:09:32 -07:00
committed by GitHub
parent 7a353eca14
commit d3a0f2c9a6
61 changed files with 741 additions and 483 deletions

View File

@@ -1,3 +1,3 @@
{
"main": "lifecycle-tests"
"main": "lifecycle-tests"
}

View File

@@ -474,15 +474,15 @@ export var test_RepeaterItemsGestureBindings = function () {
helper.navigateToModuleAndRunTest('ui/repeater/repeaterItems-bindingToGestures-page', null, testFunc);
};
export var test_RepeaterItemsParentBindingsShouldWork = function () {
export var test_RepeaterItemsBindingsShouldWork = function () {
var testFunc = function (page: Page) {
var repeater = <Repeater>page.getViewById('repeater');
var expectedText = page.bindingContext['parentViewProperty'];
var testPass = false;
var expectedText = page.bindingContext['items'];
var testPass: string;
var eachChildCallback = function (childItem: View) {
if (childItem instanceof Label) {
testPass = (<Label>childItem).text === expectedText;
if (testPass === false) {
testPass = (<Label>childItem).text;
if (!testPass) {
return false;
}
} else if (childItem instanceof LayoutBase) {
@@ -494,7 +494,7 @@ export var test_RepeaterItemsParentBindingsShouldWork = function () {
repeater.eachChildView(eachChildCallback);
TKUnit.assertEqual(testPass, true, 'Every item should have text bound to Page binding context!');
TKUnit.assertEqual(!!testPass, true, 'Every item should have text bound to binding context!');
};
helper.navigateToModuleAndRunTest('ui/repeater/repeaterItems-bindingToGestures-page', null, testFunc);

View File

@@ -1,4 +1,4 @@
function pageLoaded(args) {
export function pageLoaded(args) {
var page = args.object;
page.bindingContext = {
items: [
@@ -18,8 +18,3 @@ function pageLoaded(args) {
parentViewProperty: 'Parent View Property',
};
}
exports.pageLoaded = pageLoaded;
exports.tapPage = function (args) {
console.log('Tap! ' + args + ' ' + args.object);
};

View File

@@ -1,8 +1,8 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded">
<Repeater id="repeater" items="{{ items }}">
<Repeater.itemTemplate>
<GridLayout width="94" height="94" >
<Label text="{{ $parents['Page'].parentViewProperty }}" tap="{{ tapItem }}" />
<GridLayout width="94" height="94">
<Label text="{{ text }}" tap="{{ tapItem }}" />
</GridLayout>
</Repeater.itemTemplate>
</Repeater>

View File

@@ -1,4 +1,4 @@
{
"name": "MyControl",
"main": "MyControl.js"
"name": "MyControl",
"main": "MyControl.js"
}