Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

esrap

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esrap - npm Package Compare versions

Comparing version
2.2.5
to
2.2.6
+1
-1
package.json
{
"name": "esrap",
"version": "2.2.5",
"version": "2.2.6",
"description": "Parse in reverse",

@@ -5,0 +5,0 @@ "repository": {

@@ -1851,11 +1851,19 @@ /** @import { TSESTree } from '@typescript-eslint/types' */

if (node.typeParameter) {
context.visit(node.typeParameter);
const legacy_type_parameter = node.typeParameter;
const key = node.key ?? legacy_type_parameter?.name;
const constraint = node.constraint ?? legacy_type_parameter?.constraint;
if (key && typeof key === 'object') {
context.visit(key);
} else {
context.visit(node.key);
context.write(key, node);
}
if (constraint) {
context.write(' in ');
context.visit(node.constraint);
context.visit(constraint);
}
context.write(']');
if (node.typeAnnotation) {

@@ -1865,2 +1873,3 @@ context.write(': ');

}
context.write('}');

@@ -2024,5 +2033,11 @@ },

if (node.declare) context.write('declare ');
else context.write('namespace ');
context.visit(node.id);
if (node.global) {
context.write('global', node.id);
} else {
// @ts-expect-error `acorn-typescript` and `@typescript-eslint/types` have slightly different type definitions
const kind = node.kind ?? (node.id.type === 'Literal' ? 'module' : 'namespace');
context.write(kind + ' ');
context.visit(node.id);
}

@@ -2029,0 +2044,0 @@ if (!node.body) return;