Comparing version 0.1.20 to 0.1.21
@@ -9,2 +9,3 @@ export interface DeclarationBase { | ||
name: string; | ||
value?: string | number; | ||
} | ||
@@ -191,3 +192,3 @@ export interface EnumDeclaration extends DeclarationBase { | ||
enum(name: string, constant?: boolean): EnumDeclaration; | ||
enumValue(name: string): EnumMemberDeclaration; | ||
enumValue(name: string, value?: string | number | undefined): EnumMemberDeclaration; | ||
property(name: string, type: Type, flags?: DeclarationFlags): PropertyDeclaration; | ||
@@ -194,0 +195,0 @@ method(name: string, parameters: Parameter[], returnType: Type, flags?: DeclarationFlags): MethodDeclaration; |
@@ -57,6 +57,7 @@ "use strict"; | ||
}, | ||
enumValue: function (name) { | ||
enumValue: function (name, value) { | ||
return { | ||
kind: 'enum-value', | ||
name: name | ||
name: name, | ||
value: value | ||
}; | ||
@@ -746,2 +747,10 @@ }, | ||
start(e.name); | ||
if (e.value) { | ||
if (typeof e.value === 'string') { | ||
print(" = \"" + e.value + "\""); | ||
} | ||
else { | ||
print(" = " + e.value); | ||
} | ||
} | ||
print(','); | ||
@@ -748,0 +757,0 @@ newline(); |
@@ -10,2 +10,3 @@ export interface DeclarationBase { | ||
name: string; | ||
value?: string | number; | ||
} | ||
@@ -261,6 +262,7 @@ | ||
enumValue(name: string): EnumMemberDeclaration { | ||
enumValue(name: string, value?: string | number): EnumMemberDeclaration { | ||
return { | ||
kind: 'enum-value', | ||
name | ||
name, | ||
value | ||
}; | ||
@@ -1000,2 +1002,11 @@ }, | ||
start(e.name); | ||
if (e.value) { | ||
if (typeof e.value === 'string') { | ||
print(` = "${e.value}"`); | ||
} else { | ||
print(` = ${e.value}`); | ||
} | ||
} | ||
print(','); | ||
@@ -1002,0 +1013,0 @@ newline(); |
{ | ||
"name": "dts-dom", | ||
"version": "0.1.20", | ||
"version": "0.1.21", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100205
2002