diff --git a/src/xsd/Exporter.ts b/src/xsd/Exporter.ts index 5def20e..1264daf 100644 --- a/src/xsd/Exporter.ts +++ b/src/xsd/Exporter.ts @@ -193,7 +193,7 @@ function exportType(type: types.TypeBase, namespace: schema.Namespace) { /** Export parsed xsd into a simpler internal schema format. */ -export function exportNamespace(namespace: Namespace) { +export function exportNamespace(namespace: Namespace): schema.Type { var outNamespace = schema.Namespace.register(namespace.id, namespace.name); var doc = outNamespace.doc; diff --git a/src/xsd/Scope.ts b/src/xsd/Scope.ts index 8babf07..2a7c199 100644 --- a/src/xsd/Scope.ts +++ b/src/xsd/Scope.ts @@ -126,7 +126,7 @@ console.log('Missing ' + type + ': ' + name.name); this.parent.setType(type); } - getType() { return(this.type); } + getType(): types.TypeBase { return(this.type); } dumpTypes() { return((this.expose['type'] || {}) as {[name: string]: TypeMember}); diff --git a/src/xsd/types/MemberBase.ts b/src/xsd/types/MemberBase.ts index 028a11e..7bd1ee6 100644 --- a/src/xsd/types/MemberBase.ts +++ b/src/xsd/types/MemberBase.ts @@ -32,7 +32,7 @@ export class MemberBase extends types.Base { return(member); } - getTypes() { + getTypes(): types.TypeBase[] { var typeList: types.TypeBase[]; // Filter out types of unresolved elements. diff --git a/src/xsd/types/TypeBase.ts b/src/xsd/types/TypeBase.ts index 4695aa4..f5b0e1b 100644 --- a/src/xsd/types/TypeBase.ts +++ b/src/xsd/types/TypeBase.ts @@ -13,7 +13,7 @@ export class TypeBase extends Base { this.surrogateKey = TypeBase.nextKey++; } - getOutType() { + getOutType(): schema.Type { var outType = this.outType; if(!outType) {