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

ts-poet

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-poet - npm Package Compare versions

Comparing version 4.2.0 to 4.3.0

1

build/Code.d.ts

@@ -5,2 +5,3 @@ import { Node } from './Node';

private placeholders;
trim: boolean;
constructor(literals: TemplateStringsArray, placeholders: any[]);

@@ -7,0 +8,0 @@ /**

5

build/Code.js

@@ -24,2 +24,4 @@ "use strict";

this.placeholders = placeholders;
// Used by joinCode
this.trim = false;
}

@@ -61,3 +63,4 @@ /**

toCodeString() {
return this.generateCode();
const code = this.generateCode();
return this.trim ? code.trim() : code;
}

@@ -64,0 +67,0 @@ deepFindImports() {

@@ -10,3 +10,6 @@ import { Import } from './Import';

export declare function arrayOf(...elements: unknown[]): Node;
export declare function joinCode(chunks: Code[], separator?: string): Code;
export declare function joinCode(chunks: Code[], opts?: {
on?: string;
trim?: boolean;
}): Code;
/** Creates an import that will be auto-imported at the top of the output file. */

@@ -13,0 +16,0 @@ export declare function imp(spec: string, opts?: {

@@ -27,7 +27,11 @@ "use strict";

exports.arrayOf = arrayOf;
function joinCode(chunks, separator = '') {
function joinCode(chunks, opts = {}) {
const { on = '', trim = true } = opts;
const literals = [''];
for (let i = 0; i < chunks.length - 1; i++) {
literals.push(separator);
literals.push(on);
}
if (trim) {
chunks.forEach((c) => (c.trim = true));
}
return new Code_1.Code(literals, chunks);

@@ -34,0 +38,0 @@ }

{
"name": "ts-poet",
"version": "4.2.0",
"version": "4.3.0",
"description": "code generation DSL for TypeScript",

@@ -5,0 +5,0 @@ "main": "build/index.js",

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