Comparing version 0.1.2 to 0.1.3
@@ -172,5 +172,11 @@ "use strict"; | ||
if (decl.jsDocComment) { | ||
// TODO: Handle multi-line JSDoc comments | ||
start("/** " + decl.jsDocComment + " */"); | ||
start('/**'); | ||
newline(); | ||
for (var _i = 0, _a = decl.jsDocComment.split(/\n/g); _i < _a.length; _i++) { | ||
var line = _a[_i]; | ||
start(" * " + line); | ||
newline(); | ||
} | ||
start(' */'); | ||
newline(); | ||
} | ||
@@ -177,0 +183,0 @@ } |
@@ -310,5 +310,10 @@ export interface DeclarationBase { | ||
if (decl.jsDocComment) { | ||
// TODO: Handle multi-line JSDoc comments | ||
start(`/** ${decl.jsDocComment} */`); | ||
start('/**'); | ||
newline(); | ||
for(const line of decl.jsDocComment.split(/\n/g)) { | ||
start(` * ${line}`); | ||
newline(); | ||
} | ||
start(' */'); | ||
newline(); | ||
} | ||
@@ -315,0 +320,0 @@ } |
{ | ||
"name": "dts-dom", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"homepage": "https://github.com/RyanCavanaugh/dts-dom", | ||
@@ -5,0 +5,0 @@ "description": "DOM for TypeScript Declaration Files", |
@@ -18,3 +18,3 @@ `dts-dom` is a library for programatically generating TypeScript declaration files. | ||
const intf = dom.create.interface('MyInterface'); | ||
intf.comment = 'This is my nice interface'; | ||
intf.jsDocComment = 'This is my nice interface'; | ||
intf.members.push(dom.create.method( | ||
@@ -34,7 +34,8 @@ 'getThing', | ||
declare namespace SomeNamespace { | ||
// This is my nice interface | ||
/** | ||
* This is my nice interface | ||
*/ | ||
interface MyInterface { | ||
getThing?(x: number): void; | ||
} | ||
} | ||
``` | ||
}``` |
"use strict"; | ||
var dom = require('../../dts-dom'); | ||
var intf = dom.create.interface('MyInterface'); | ||
intf.comment = 'This is my nice interface'; | ||
intf.jsDocComment = 'This is my nice interface'; | ||
intf.members.push(dom.create.method('getThing', [dom.create.parameter('x', dom.type.number)], dom.type.void, dom.MemberFlags.Optional)); | ||
@@ -6,0 +6,0 @@ var ns = dom.create.namespace('SomeNamespace'); |
import * as dom from '../../dts-dom'; | ||
const intf = dom.create.interface('MyInterface'); | ||
intf.comment = 'This is my nice interface'; | ||
intf.jsDocComment = 'This is my nice interface'; | ||
intf.members.push(dom.create.method( | ||
@@ -6,0 +6,0 @@ 'getThing', |
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
39975
925
39