Comparing version 0.1.11 to 0.1.12
@@ -144,2 +144,3 @@ export interface DeclarationBase { | ||
const(name: string, type: Type): ConstDeclaration; | ||
alias(name: string, type: Type): TypeAliasDeclaration; | ||
namespace(name: string): NamespaceDeclaration; | ||
@@ -146,0 +147,0 @@ objectType(members: ObjectTypeMember[]): ObjectType; |
"use strict"; | ||
var DeclarationFlags; | ||
(function (DeclarationFlags) { | ||
@@ -11,4 +12,4 @@ DeclarationFlags[DeclarationFlags["None"] = 0] = "None"; | ||
DeclarationFlags[DeclarationFlags["ExportDefault"] = 64] = "ExportDefault"; | ||
})(exports.DeclarationFlags || (exports.DeclarationFlags = {})); | ||
var DeclarationFlags = exports.DeclarationFlags; | ||
})(DeclarationFlags = exports.DeclarationFlags || (exports.DeclarationFlags = {})); | ||
var ParameterFlags; | ||
(function (ParameterFlags) { | ||
@@ -18,4 +19,3 @@ ParameterFlags[ParameterFlags["None"] = 0] = "None"; | ||
ParameterFlags[ParameterFlags["Rest"] = 2] = "Rest"; | ||
})(exports.ParameterFlags || (exports.ParameterFlags = {})); | ||
var ParameterFlags = exports.ParameterFlags; | ||
})(ParameterFlags = exports.ParameterFlags || (exports.ParameterFlags = {})); | ||
exports.create = { | ||
@@ -84,2 +84,7 @@ interface: function (name) { | ||
}, | ||
alias: function (name, type) { | ||
return { | ||
kind: "alias", name: name, type: type | ||
}; | ||
}, | ||
namespace: function (name) { | ||
@@ -517,3 +522,7 @@ return { | ||
function writeAlias(a) { | ||
throw new Error("NYI"); | ||
printDeclarationComments(a); | ||
startWithDeclareOrExport("type " + a.name + " = ", a.flags); | ||
writeReference(a.type); | ||
print(';'); | ||
newline(); | ||
} | ||
@@ -520,0 +529,0 @@ function writeExportEquals(e) { |
@@ -232,2 +232,8 @@ export interface DeclarationBase { | ||
alias(name: string, type: Type): TypeAliasDeclaration { | ||
return { | ||
kind: "alias", name, type | ||
}; | ||
}, | ||
namespace(name: string): NamespaceDeclaration { | ||
@@ -707,3 +713,7 @@ return { | ||
function writeAlias(a: TypeAliasDeclaration) { | ||
throw new Error("NYI"); | ||
printDeclarationComments(a); | ||
startWithDeclareOrExport(`type ${a.name} = `, a.flags); | ||
writeReference(a.type); | ||
print(';'); | ||
newline(); | ||
} | ||
@@ -710,0 +720,0 @@ |
{ | ||
"name": "dts-dom", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"homepage": "https://github.com/RyanCavanaugh/dts-dom", | ||
@@ -5,0 +5,0 @@ "description": "DOM for TypeScript Declaration Files", |
Sorry, the diff of this file is not supported yet
76566
1492