// Definitions. import { LoadOptions } from "."; import { View, ViewBase, Template, KeyedTemplate } from "../core/view"; // Types. import { debug, ScopeError, SourceError, Source } from "../../utils/debug"; import * as xml from "../../xml"; import { File, path, knownFolders } from "../../file-system"; import { isString, isDefined } from "../../utils/types"; import { ComponentModule, setPropertyValue, getComponentModule } from "./component-builder"; import { platformNames, device } from "../../platform"; import { resolveFileName } from "../../file-system/file-name-resolver"; import { profile } from "../../profiling"; import * as traceModule from "../../trace"; const ios = platformNames.ios.toLowerCase(); const android = platformNames.android.toLowerCase(); const defaultNameSpaceMatcher = /tns\.xsd$/i; var trace: typeof traceModule; function ensureTrace() { if (!trace) { trace = require("trace"); } } export function parse(value: string | Template, context: any): View { if (typeof value === "function") { return (