mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup reexports
This commit is contained in:
@@ -140,13 +140,13 @@ export function getComponentModule(elementName: string, namespace: string, attri
|
||||
// Support lower-case-dashed component declaration in the XML (https://github.com/NativeScript/NativeScript/issues/309).
|
||||
elementName = elementName.split("-").map(s => s[0].toUpperCase() + s.substring(1)).join("");
|
||||
|
||||
const { instance, instanceModule } = createComponentInstance(elementName, namespace);
|
||||
moduleExports = getComponentModuleExports(instance, moduleExports, attributes);
|
||||
const { instance, instanceModule } = createComponentInstance(elementName, namespace, null);
|
||||
moduleExports = getComponentModuleExports(instance, <any>moduleExports, attributes);
|
||||
if (isRootComponent) {
|
||||
applyComponentCss(instance, moduleNamePath, attributes);
|
||||
}
|
||||
|
||||
applyComponentAttributes(instance, instanceModule, moduleExports, attributes);
|
||||
applyComponentAttributes(instance, instanceModule, moduleExports);
|
||||
|
||||
let componentModule;
|
||||
if (instance && instanceModule) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// Definitions.
|
||||
import { LoadOptions } from ".";
|
||||
import { View, ViewBase, Template, KeyedTemplate } from "../core/view";
|
||||
import { View, Template, KeyedTemplate } from "../core/view";
|
||||
import { ViewBase } from "../core/view-base";
|
||||
import { ViewEntry } from "../frame";
|
||||
import { Page } from "../page";
|
||||
|
||||
// Types.
|
||||
import { debug, ScopeError, SourceError, Source } from "../../utils/debug";
|
||||
@@ -17,6 +18,14 @@ const ios = platformNames.ios.toLowerCase();
|
||||
const android = platformNames.android.toLowerCase();
|
||||
const defaultNameSpaceMatcher = /tns\.xsd$/i;
|
||||
|
||||
export interface LoadOptions {
|
||||
path: string;
|
||||
name: string;
|
||||
attributes?: any;
|
||||
exports?: any;
|
||||
page?: Page;
|
||||
}
|
||||
|
||||
export class Builder {
|
||||
static createViewFromEntry(entry: ViewEntry): View {
|
||||
if (entry.create) {
|
||||
@@ -482,7 +491,7 @@ namespace xml2ui {
|
||||
const context = this._context;
|
||||
const errorFormat = this._templateProperty.errorFormat;
|
||||
const sourceTracker = this._templateProperty.sourceTracker;
|
||||
const template: Template = profile("Template()", () => {
|
||||
const template: Template = <Template>profile("Template()", () => {
|
||||
let start: xml2ui.XmlArgsReplay;
|
||||
let ui: xml2ui.ComponentParser;
|
||||
|
||||
@@ -568,7 +577,7 @@ namespace xml2ui {
|
||||
this.sourceTracker = sourceTracker;
|
||||
}
|
||||
|
||||
@profile
|
||||
@profile()
|
||||
private buildComponent(args: xml.ParserEvent): ComponentModule {
|
||||
if (args.prefix && args.namespace) {
|
||||
// Custom components
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "builder",
|
||||
"main": "builder",
|
||||
"types": "builder.d.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user