From 09d289131e28375be1be629e8e999600f3ce5302 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Tue, 7 Jul 2015 15:36:20 +0300 Subject: [PATCH] fileName change to path and componentName changed to name --- .../xml-declaration/xml-declaration-tests.ts | 16 ++++++++-------- ui/builder/builder.d.ts | 4 ++-- ui/builder/builder.ts | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/tests/xml-declaration/xml-declaration-tests.ts b/apps/tests/xml-declaration/xml-declaration-tests.ts index 027c331e0..5fbc4de33 100644 --- a/apps/tests/xml-declaration/xml-declaration-tests.ts +++ b/apps/tests/xml-declaration/xml-declaration-tests.ts @@ -42,8 +42,8 @@ export function test_load_ShouldNotCrashWithoutExports() { export function test_loadWithOptionsNoXML() { var v = builder.load({ - fileName: "~/xml-declaration/mymodule", - componentName: "MyControl", + path: "~/xml-declaration/mymodule", + name: "MyControl", exports: exports }); @@ -52,8 +52,8 @@ export function test_loadWithOptionsNoXML() { export function test_loadWithOptionsWithXML() { var v = builder.load({ - fileName: "~/xml-declaration/mymodulewithxml", - componentName: "MyControl", + path: "~/xml-declaration/mymodulewithxml", + name: "MyControl", exports: exports }); TKUnit.assert(v instanceof view.View, "Expected result: View; Actual result: " + v + ";"); @@ -61,8 +61,8 @@ export function test_loadWithOptionsWithXML() { export function test_loadWithOptionsFromTNS() { var v = builder.load({ - fileName: "ui/label", - componentName: "Label" + path: "ui/label", + name: "Label" }); TKUnit.assert(v instanceof labelModule.Label, "Expected result: Label; Actual result: " + v + ";"); @@ -70,8 +70,8 @@ export function test_loadWithOptionsFromTNS() { export function test_loadWithOptionsFromTNSPath() { var v = builder.load({ - fileName: "tns_modules/ui/label", - componentName: "Label" + path: "tns_modules/ui/label", + name: "Label" }); TKUnit.assert(v instanceof labelModule.Label, "Expected result: Label; Actual result: " + v + ";"); diff --git a/ui/builder/builder.d.ts b/ui/builder/builder.d.ts index 9e91c0b77..9834658f5 100644 --- a/ui/builder/builder.d.ts +++ b/ui/builder/builder.d.ts @@ -7,8 +7,8 @@ declare module "ui/builder" { export function parse(value: string, exports?: any): view.View; export interface LoadOptions { - fileName: string; - componentName: string; + path: string; + name: string; exports?: any; } } diff --git a/ui/builder/builder.ts b/ui/builder/builder.ts index a9532ed1f..93d639d4f 100644 --- a/ui/builder/builder.ts +++ b/ui/builder/builder.ts @@ -227,7 +227,7 @@ export function load(arg: any): view.View { if (arguments.length === 1) { if (!types.isString(arguments[0])) { var options = arguments[0]; - componentModule = loadCustomComponent(options.fileName, options.componentName, undefined, options.exports); + componentModule = loadCustomComponent(options.path, options.name, undefined, options.exports); } else { componentModule = loadInternal(arguments[0]); }