Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dts-dom

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dts-dom - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

10

bin/index.js

@@ -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 @@ }

9

lib/index.ts

@@ -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',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc