Socket
Socket
Sign inDemoInstall

@babel/generator

Package Overview
Dependencies
10
Maintainers
4
Versions
166
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.21.4-esm.2 to 7.21.4-esm.3

9

lib/buffer.js

@@ -1,2 +0,8 @@

export default class Buffer {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
class Buffer {
constructor(map) {

@@ -299,3 +305,4 @@ this._map = null;

}
exports.default = Buffer;
//# sourceMappingURL=buffer.js.map

26

lib/generators/base.js

@@ -1,2 +0,14 @@

export function File(node) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BlockStatement = BlockStatement;
exports.Directive = Directive;
exports.DirectiveLiteral = DirectiveLiteral;
exports.File = File;
exports.InterpreterDirective = InterpreterDirective;
exports.Placeholder = Placeholder;
exports.Program = Program;
function File(node) {
if (node.program) {

@@ -7,3 +19,3 @@ this.print(node.program.interpreter, node);

}
export function Program(node) {
function Program(node) {
var _node$directives;

@@ -25,3 +37,3 @@ this.noIndentInnerCommentsHere();

}
export function BlockStatement(node) {
function BlockStatement(node) {
var _node$directives2;

@@ -47,3 +59,3 @@ this.tokenChar(123);

}
export function Directive(node) {
function Directive(node) {
this.print(node.value, node);

@@ -54,3 +66,3 @@ this.semicolon();

const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
export function DirectiveLiteral(node) {
function DirectiveLiteral(node) {
const raw = this.getPossibleRaw(node);

@@ -72,7 +84,7 @@ if (!this.format.minified && raw !== undefined) {

}
export function InterpreterDirective(node) {
function InterpreterDirective(node) {
this.token(`#!${node.value}`);
this.newline(1, true);
}
export function Placeholder(node) {
function Placeholder(node) {
this.token("%%");

@@ -79,0 +91,0 @@ this.print(node.name);

@@ -1,2 +0,16 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ClassAccessorProperty = ClassAccessorProperty;
exports.ClassBody = ClassBody;
exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
exports.ClassMethod = ClassMethod;
exports.ClassPrivateMethod = ClassPrivateMethod;
exports.ClassPrivateProperty = ClassPrivateProperty;
exports.ClassProperty = ClassProperty;
exports.StaticBlock = StaticBlock;
exports._classMethodHead = _classMethodHead;
var _t = require("@babel/types");
const {

@@ -6,3 +20,3 @@ isExportDefaultDeclaration,

} = _t;
export function ClassDeclaration(node, parent) {
function ClassDeclaration(node, parent) {
const inExport = isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent);

@@ -42,4 +56,3 @@ if (!inExport || !this._shouldPrintDecoratorsBeforeExport(parent)) {

}
export { ClassDeclaration as ClassExpression };
export function ClassBody(node) {
function ClassBody(node) {
this.tokenChar(123);

@@ -58,3 +71,3 @@ if (node.body.length === 0) {

}
export function ClassProperty(node) {
function ClassProperty(node) {
var _node$key$loc, _node$key$loc$end;

@@ -88,3 +101,3 @@ this.printJoin(node.decorators, node);

}
export function ClassAccessorProperty(node) {
function ClassAccessorProperty(node) {
var _node$key$loc2, _node$key$loc2$end;

@@ -120,3 +133,3 @@ this.printJoin(node.decorators, node);

}
export function ClassPrivateProperty(node) {
function ClassPrivateProperty(node) {
this.printJoin(node.decorators, node);

@@ -137,3 +150,3 @@ if (node.static) {

}
export function ClassMethod(node) {
function ClassMethod(node) {
this._classMethodHead(node);

@@ -143,3 +156,3 @@ this.space();

}
export function ClassPrivateMethod(node) {
function ClassPrivateMethod(node) {
this._classMethodHead(node);

@@ -149,3 +162,3 @@ this.space();

}
export function _classMethodHead(node) {
function _classMethodHead(node) {
var _node$key$loc3, _node$key$loc3$end;

@@ -158,3 +171,3 @@ this.printJoin(node.decorators, node);

}
export function StaticBlock(node) {
function StaticBlock(node) {
this.word("static");

@@ -161,0 +174,0 @@ this.space();

@@ -1,2 +0,35 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
exports.AssignmentPattern = AssignmentPattern;
exports.AwaitExpression = AwaitExpression;
exports.BindExpression = BindExpression;
exports.CallExpression = CallExpression;
exports.ConditionalExpression = ConditionalExpression;
exports.Decorator = Decorator;
exports.DoExpression = DoExpression;
exports.EmptyStatement = EmptyStatement;
exports.ExpressionStatement = ExpressionStatement;
exports.Import = Import;
exports.MemberExpression = MemberExpression;
exports.MetaProperty = MetaProperty;
exports.ModuleExpression = ModuleExpression;
exports.NewExpression = NewExpression;
exports.OptionalCallExpression = OptionalCallExpression;
exports.OptionalMemberExpression = OptionalMemberExpression;
exports.ParenthesizedExpression = ParenthesizedExpression;
exports.PrivateName = PrivateName;
exports.SequenceExpression = SequenceExpression;
exports.Super = Super;
exports.ThisExpression = ThisExpression;
exports.UnaryExpression = UnaryExpression;
exports.UpdateExpression = UpdateExpression;
exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
exports.YieldExpression = YieldExpression;
exports._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport;
var _t = require("@babel/types");
var n = require("../node");
const {

@@ -8,4 +41,3 @@ isCallExpression,

} = _t;
import * as n from "../node/index.js";
export function UnaryExpression(node) {
function UnaryExpression(node) {
if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {

@@ -19,3 +51,3 @@ this.word(node.operator);

}
export function DoExpression(node) {
function DoExpression(node) {
if (node.async) {

@@ -29,3 +61,3 @@ this.word("async", true);

}
export function ParenthesizedExpression(node) {
function ParenthesizedExpression(node) {
this.tokenChar(40);

@@ -35,3 +67,3 @@ this.print(node.expression, node);

}
export function UpdateExpression(node) {
function UpdateExpression(node) {
if (node.prefix) {

@@ -45,3 +77,3 @@ this.token(node.operator);

}
export function ConditionalExpression(node) {
function ConditionalExpression(node) {
this.print(node.test, node);

@@ -57,3 +89,3 @@ this.space();

}
export function NewExpression(node, parent) {
function NewExpression(node, parent) {
this.word("new");

@@ -76,9 +108,9 @@ this.space();

}
export function SequenceExpression(node) {
function SequenceExpression(node) {
this.printList(node.expressions, node);
}
export function ThisExpression() {
function ThisExpression() {
this.word("this");
}
export function Super() {
function Super() {
this.word("super");

@@ -102,3 +134,3 @@ }

}
export function _shouldPrintDecoratorsBeforeExport(node) {
function _shouldPrintDecoratorsBeforeExport(node) {
if (typeof this.format.decoratorsBeforeExport === "boolean") {

@@ -109,3 +141,3 @@ return this.format.decoratorsBeforeExport;

}
export function Decorator(node) {
function Decorator(node) {
this.tokenChar(64);

@@ -124,3 +156,3 @@ const {

}
export function OptionalMemberExpression(node) {
function OptionalMemberExpression(node) {
this.print(node.object, node);

@@ -148,3 +180,3 @@ if (!node.computed && isMemberExpression(node.property)) {

}
export function OptionalCallExpression(node) {
function OptionalCallExpression(node) {
this.print(node.callee, node);

@@ -160,3 +192,3 @@ this.print(node.typeParameters, node);

}
export function CallExpression(node) {
function CallExpression(node) {
this.print(node.callee, node);

@@ -169,6 +201,6 @@ this.print(node.typeArguments, node);

}
export function Import() {
function Import() {
this.word("import");
}
export function AwaitExpression(node) {
function AwaitExpression(node) {
this.word("await");

@@ -180,3 +212,3 @@ if (node.argument) {

}
export function YieldExpression(node) {
function YieldExpression(node) {
this.word("yield", true);

@@ -196,10 +228,10 @@ if (node.delegate) {

}
export function EmptyStatement() {
function EmptyStatement() {
this.semicolon(true);
}
export function ExpressionStatement(node) {
function ExpressionStatement(node) {
this.print(node.expression, node);
this.semicolon();
}
export function AssignmentPattern(node) {
function AssignmentPattern(node) {
this.print(node.left, node);

@@ -213,3 +245,3 @@ if (node.left.optional) this.tokenChar(63);

}
export function AssignmentExpression(node, parent) {
function AssignmentExpression(node, parent) {
const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);

@@ -232,3 +264,3 @@ if (parens) {

}
export function BindExpression(node) {
function BindExpression(node) {
this.print(node.object, node);

@@ -238,4 +270,3 @@ this.token("::");

}
export { AssignmentExpression as BinaryExpression, AssignmentExpression as LogicalExpression };
export function MemberExpression(node) {
function MemberExpression(node) {
this.print(node.object, node);

@@ -258,3 +289,3 @@ if (!node.computed && isMemberExpression(node.property)) {

}
export function MetaProperty(node) {
function MetaProperty(node) {
this.print(node.meta, node);

@@ -264,11 +295,11 @@ this.tokenChar(46);

}
export function PrivateName(node) {
function PrivateName(node) {
this.tokenChar(35);
this.print(node.id, node);
}
export function V8IntrinsicIdentifier(node) {
function V8IntrinsicIdentifier(node) {
this.tokenChar(37);
this.word(node.name);
}
export function ModuleExpression(node) {
function ModuleExpression(node) {
this.word("module", true);

@@ -275,0 +306,0 @@ this.space();

@@ -1,2 +0,83 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AnyTypeAnnotation = AnyTypeAnnotation;
exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
exports.DeclareClass = DeclareClass;
exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
exports.DeclareExportDeclaration = DeclareExportDeclaration;
exports.DeclareFunction = DeclareFunction;
exports.DeclareInterface = DeclareInterface;
exports.DeclareModule = DeclareModule;
exports.DeclareModuleExports = DeclareModuleExports;
exports.DeclareOpaqueType = DeclareOpaqueType;
exports.DeclareTypeAlias = DeclareTypeAlias;
exports.DeclareVariable = DeclareVariable;
exports.DeclaredPredicate = DeclaredPredicate;
exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
exports.EnumBooleanBody = EnumBooleanBody;
exports.EnumBooleanMember = EnumBooleanMember;
exports.EnumDeclaration = EnumDeclaration;
exports.EnumDefaultedMember = EnumDefaultedMember;
exports.EnumNumberBody = EnumNumberBody;
exports.EnumNumberMember = EnumNumberMember;
exports.EnumStringBody = EnumStringBody;
exports.EnumStringMember = EnumStringMember;
exports.EnumSymbolBody = EnumSymbolBody;
exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
exports.FunctionTypeParam = FunctionTypeParam;
exports.IndexedAccessType = IndexedAccessType;
exports.InferredPredicate = InferredPredicate;
exports.InterfaceDeclaration = InterfaceDeclaration;
exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
exports.MixedTypeAnnotation = MixedTypeAnnotation;
exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
exports.NullableTypeAnnotation = NullableTypeAnnotation;
Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
enumerable: true,
get: function () {
return _types2.NumericLiteral;
}
});
exports.NumberTypeAnnotation = NumberTypeAnnotation;
exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
exports.ObjectTypeIndexer = ObjectTypeIndexer;
exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
exports.ObjectTypeProperty = ObjectTypeProperty;
exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
exports.OpaqueType = OpaqueType;
exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
enumerable: true,
get: function () {
return _types2.StringLiteral;
}
});
exports.StringTypeAnnotation = StringTypeAnnotation;
exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
exports.ThisTypeAnnotation = ThisTypeAnnotation;
exports.TupleTypeAnnotation = TupleTypeAnnotation;
exports.TypeAlias = TypeAlias;
exports.TypeAnnotation = TypeAnnotation;
exports.TypeCastExpression = TypeCastExpression;
exports.TypeParameter = TypeParameter;
exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
exports.UnionTypeAnnotation = UnionTypeAnnotation;
exports.Variance = Variance;
exports.VoidTypeAnnotation = VoidTypeAnnotation;
exports._interfaceish = _interfaceish;
exports._variance = _variance;
var _t = require("@babel/types");
var _modules = require("./modules");
var _types2 = require("./types");
const {

@@ -6,7 +87,6 @@ isDeclareExportDeclaration,

} = _t;
import { ExportAllDeclaration } from "./modules.js";
export function AnyTypeAnnotation() {
function AnyTypeAnnotation() {
this.word("any");
}
export function ArrayTypeAnnotation(node) {
function ArrayTypeAnnotation(node) {
this.print(node.elementType, node, true);

@@ -16,12 +96,12 @@ this.tokenChar(91);

}
export function BooleanTypeAnnotation() {
function BooleanTypeAnnotation() {
this.word("boolean");
}
export function BooleanLiteralTypeAnnotation(node) {
function BooleanLiteralTypeAnnotation(node) {
this.word(node.value ? "true" : "false");
}
export function NullLiteralTypeAnnotation() {
function NullLiteralTypeAnnotation() {
this.word("null");
}
export function DeclareClass(node, parent) {
function DeclareClass(node, parent) {
if (!isDeclareExportDeclaration(parent)) {

@@ -35,3 +115,3 @@ this.word("declare");

}
export function DeclareFunction(node, parent) {
function DeclareFunction(node, parent) {
if (!isDeclareExportDeclaration(parent)) {

@@ -51,7 +131,7 @@ this.word("declare");

}
export function InferredPredicate() {
function InferredPredicate() {
this.tokenChar(37);
this.word("checks");
}
export function DeclaredPredicate(node) {
function DeclaredPredicate(node) {
this.tokenChar(37);

@@ -63,3 +143,3 @@ this.word("checks");

}
export function DeclareInterface(node) {
function DeclareInterface(node) {
this.word("declare");

@@ -69,3 +149,3 @@ this.space();

}
export function DeclareModule(node) {
function DeclareModule(node) {
this.word("declare");

@@ -79,3 +159,3 @@ this.space();

}
export function DeclareModuleExports(node) {
function DeclareModuleExports(node) {
this.word("declare");

@@ -88,3 +168,3 @@ this.space();

}
export function DeclareTypeAlias(node) {
function DeclareTypeAlias(node) {
this.word("declare");

@@ -94,3 +174,3 @@ this.space();

}
export function DeclareOpaqueType(node, parent) {
function DeclareOpaqueType(node, parent) {
if (!isDeclareExportDeclaration(parent)) {

@@ -102,3 +182,3 @@ this.word("declare");

}
export function DeclareVariable(node, parent) {
function DeclareVariable(node, parent) {
if (!isDeclareExportDeclaration(parent)) {

@@ -114,3 +194,3 @@ this.word("declare");

}
export function DeclareExportDeclaration(node) {
function DeclareExportDeclaration(node) {
this.word("declare");

@@ -126,8 +206,8 @@ this.space();

}
export function DeclareExportAllDeclaration(node) {
function DeclareExportAllDeclaration(node) {
this.word("declare");
this.space();
ExportAllDeclaration.call(this, node);
_modules.ExportAllDeclaration.call(this, node);
}
export function EnumDeclaration(node) {
function EnumDeclaration(node) {
const {

@@ -169,3 +249,3 @@ id,

}
export function EnumBooleanBody(node) {
function EnumBooleanBody(node) {
const {

@@ -177,3 +257,3 @@ explicitType

}
export function EnumNumberBody(node) {
function EnumNumberBody(node) {
const {

@@ -185,3 +265,3 @@ explicitType

}
export function EnumStringBody(node) {
function EnumStringBody(node) {
const {

@@ -193,7 +273,7 @@ explicitType

}
export function EnumSymbolBody(node) {
function EnumSymbolBody(node) {
enumExplicitType(this, "symbol", true);
enumBody(this, node);
}
export function EnumDefaultedMember(node) {
function EnumDefaultedMember(node) {
const {

@@ -217,9 +297,9 @@ id

}
export function EnumBooleanMember(node) {
function EnumBooleanMember(node) {
enumInitializedMember(this, node);
}
export function EnumNumberMember(node) {
function EnumNumberMember(node) {
enumInitializedMember(this, node);
}
export function EnumStringMember(node) {
function EnumStringMember(node) {
enumInitializedMember(this, node);

@@ -249,6 +329,6 @@ }

}
export function ExistsTypeAnnotation() {
function ExistsTypeAnnotation() {
this.tokenChar(42);
}
export function FunctionTypeAnnotation(node, parent) {
function FunctionTypeAnnotation(node, parent) {
this.print(node.typeParameters, node);

@@ -285,3 +365,3 @@ this.tokenChar(40);

}
export function FunctionTypeParam(node) {
function FunctionTypeParam(node) {
this.print(node.name, node);

@@ -295,8 +375,7 @@ if (node.optional) this.tokenChar(63);

}
export function InterfaceExtends(node) {
function InterfaceExtends(node) {
this.print(node.id, node);
this.print(node.typeParameters, node, true);
}
export { InterfaceExtends as ClassImplements, InterfaceExtends as GenericTypeAnnotation };
export function _interfaceish(node) {
function _interfaceish(node) {
var _node$extends;

@@ -326,3 +405,3 @@ this.print(node.id, node);

}
export function _variance(node) {
function _variance(node) {
if (node.variance) {

@@ -336,3 +415,3 @@ if (node.variance.kind === "plus") {

}
export function InterfaceDeclaration(node) {
function InterfaceDeclaration(node) {
this.word("interface");

@@ -347,3 +426,3 @@ this.space();

}
export function InterfaceTypeAnnotation(node) {
function InterfaceTypeAnnotation(node) {
this.word("interface");

@@ -359,3 +438,3 @@ if (node.extends && node.extends.length) {

}
export function IntersectionTypeAnnotation(node) {
function IntersectionTypeAnnotation(node) {
this.printJoin(node.types, node, {

@@ -365,23 +444,22 @@ separator: andSeparator

}
export function MixedTypeAnnotation() {
function MixedTypeAnnotation() {
this.word("mixed");
}
export function EmptyTypeAnnotation() {
function EmptyTypeAnnotation() {
this.word("empty");
}
export function NullableTypeAnnotation(node) {
function NullableTypeAnnotation(node) {
this.tokenChar(63);
this.print(node.typeAnnotation, node);
}
export { NumericLiteral as NumberLiteralTypeAnnotation, StringLiteral as StringLiteralTypeAnnotation } from "./types.js";
export function NumberTypeAnnotation() {
function NumberTypeAnnotation() {
this.word("number");
}
export function StringTypeAnnotation() {
function StringTypeAnnotation() {
this.word("string");
}
export function ThisTypeAnnotation() {
function ThisTypeAnnotation() {
this.word("this");
}
export function TupleTypeAnnotation(node) {
function TupleTypeAnnotation(node) {
this.tokenChar(91);

@@ -391,3 +469,3 @@ this.printList(node.types, node);

}
export function TypeofTypeAnnotation(node) {
function TypeofTypeAnnotation(node) {
this.word("typeof");

@@ -397,3 +475,3 @@ this.space();

}
export function TypeAlias(node) {
function TypeAlias(node) {
this.word("type");

@@ -409,3 +487,3 @@ this.space();

}
export function TypeAnnotation(node) {
function TypeAnnotation(node) {
this.tokenChar(58);

@@ -416,3 +494,3 @@ this.space();

}
export function TypeParameterInstantiation(node) {
function TypeParameterInstantiation(node) {
this.tokenChar(60);

@@ -422,4 +500,3 @@ this.printList(node.params, node, {});

}
export { TypeParameterInstantiation as TypeParameterDeclaration };
export function TypeParameter(node) {
function TypeParameter(node) {
this._variance(node);

@@ -437,3 +514,3 @@ this.word(node.name);

}
export function OpaqueType(node) {
function OpaqueType(node) {
this.word("opaque");

@@ -458,3 +535,3 @@ this.space();

}
export function ObjectTypeAnnotation(node) {
function ObjectTypeAnnotation(node) {
if (node.exact) {

@@ -498,3 +575,3 @@ this.token("{|");

}
export function ObjectTypeInternalSlot(node) {
function ObjectTypeInternalSlot(node) {
if (node.static) {

@@ -516,3 +593,3 @@ this.word("static");

}
export function ObjectTypeCallProperty(node) {
function ObjectTypeCallProperty(node) {
if (node.static) {

@@ -524,3 +601,3 @@ this.word("static");

}
export function ObjectTypeIndexer(node) {
function ObjectTypeIndexer(node) {
if (node.static) {

@@ -543,3 +620,3 @@ this.word("static");

}
export function ObjectTypeProperty(node) {
function ObjectTypeProperty(node) {
if (node.proto) {

@@ -566,7 +643,7 @@ this.word("proto");

}
export function ObjectTypeSpreadProperty(node) {
function ObjectTypeSpreadProperty(node) {
this.token("...");
this.print(node.argument, node);
}
export function QualifiedTypeIdentifier(node) {
function QualifiedTypeIdentifier(node) {
this.print(node.qualification, node);

@@ -576,3 +653,3 @@ this.tokenChar(46);

}
export function SymbolTypeAnnotation() {
function SymbolTypeAnnotation() {
this.word("symbol");

@@ -585,3 +662,3 @@ }

}
export function UnionTypeAnnotation(node) {
function UnionTypeAnnotation(node) {
this.printJoin(node.types, node, {

@@ -591,3 +668,3 @@ separator: orSeparator

}
export function TypeCastExpression(node) {
function TypeCastExpression(node) {
this.tokenChar(40);

@@ -598,3 +675,3 @@ this.print(node.expression, node);

}
export function Variance(node) {
function Variance(node) {
if (node.kind === "plus") {

@@ -606,6 +683,6 @@ this.tokenChar(43);

}
export function VoidTypeAnnotation() {
function VoidTypeAnnotation() {
this.word("void");
}
export function IndexedAccessType(node) {
function IndexedAccessType(node) {
this.print(node.objectType, node, true);

@@ -616,3 +693,3 @@ this.tokenChar(91);

}
export function OptionalIndexedAccessType(node) {
function OptionalIndexedAccessType(node) {
this.print(node.objectType, node);

@@ -619,0 +696,0 @@ if (node.optional) {

@@ -1,13 +0,128 @@

export * from "./template-literals.js";
export * from "./expressions.js";
export * from "./statements.js";
export * from "./classes.js";
export * from "./methods.js";
export * from "./modules.js";
export * from "./types.js";
export * from "./flow.js";
export * from "./base.js";
export * from "./jsx.js";
export * from "./typescript.js";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _templateLiterals = require("./template-literals");
Object.keys(_templateLiterals).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _templateLiterals[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _templateLiterals[key];
}
});
});
var _expressions = require("./expressions");
Object.keys(_expressions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _expressions[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _expressions[key];
}
});
});
var _statements = require("./statements");
Object.keys(_statements).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _statements[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _statements[key];
}
});
});
var _classes = require("./classes");
Object.keys(_classes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _classes[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _classes[key];
}
});
});
var _methods = require("./methods");
Object.keys(_methods).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _methods[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _methods[key];
}
});
});
var _modules = require("./modules");
Object.keys(_modules).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _modules[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _modules[key];
}
});
});
var _types = require("./types");
Object.keys(_types).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _types[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _types[key];
}
});
});
var _flow = require("./flow");
Object.keys(_flow).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _flow[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _flow[key];
}
});
});
var _base = require("./base");
Object.keys(_base).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _base[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _base[key];
}
});
});
var _jsx = require("./jsx");
Object.keys(_jsx).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _jsx[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _jsx[key];
}
});
});
var _typescript = require("./typescript");
Object.keys(_typescript).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _typescript[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _typescript[key];
}
});
});
//# sourceMappingURL=index.js.map

@@ -1,2 +0,22 @@

export function JSXAttribute(node) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.JSXAttribute = JSXAttribute;
exports.JSXClosingElement = JSXClosingElement;
exports.JSXClosingFragment = JSXClosingFragment;
exports.JSXElement = JSXElement;
exports.JSXEmptyExpression = JSXEmptyExpression;
exports.JSXExpressionContainer = JSXExpressionContainer;
exports.JSXFragment = JSXFragment;
exports.JSXIdentifier = JSXIdentifier;
exports.JSXMemberExpression = JSXMemberExpression;
exports.JSXNamespacedName = JSXNamespacedName;
exports.JSXOpeningElement = JSXOpeningElement;
exports.JSXOpeningFragment = JSXOpeningFragment;
exports.JSXSpreadAttribute = JSXSpreadAttribute;
exports.JSXSpreadChild = JSXSpreadChild;
exports.JSXText = JSXText;
function JSXAttribute(node) {
this.print(node.name, node);

@@ -8,6 +28,6 @@ if (node.value) {

}
export function JSXIdentifier(node) {
function JSXIdentifier(node) {
this.word(node.name);
}
export function JSXNamespacedName(node) {
function JSXNamespacedName(node) {
this.print(node.namespace, node);

@@ -17,3 +37,3 @@ this.tokenChar(58);

}
export function JSXMemberExpression(node) {
function JSXMemberExpression(node) {
this.print(node.object, node);

@@ -23,3 +43,3 @@ this.tokenChar(46);

}
export function JSXSpreadAttribute(node) {
function JSXSpreadAttribute(node) {
this.tokenChar(123);

@@ -30,3 +50,3 @@ this.token("...");

}
export function JSXExpressionContainer(node) {
function JSXExpressionContainer(node) {
this.tokenChar(123);

@@ -36,3 +56,3 @@ this.print(node.expression, node);

}
export function JSXSpreadChild(node) {
function JSXSpreadChild(node) {
this.tokenChar(123);

@@ -43,3 +63,3 @@ this.token("...");

}
export function JSXText(node) {
function JSXText(node) {
const raw = this.getPossibleRaw(node);

@@ -52,3 +72,3 @@ if (raw !== undefined) {

}
export function JSXElement(node) {
function JSXElement(node) {
const open = node.openingElement;

@@ -67,3 +87,3 @@ this.print(open, node);

}
export function JSXOpeningElement(node) {
function JSXOpeningElement(node) {
this.tokenChar(60);

@@ -85,3 +105,3 @@ this.print(node.name, node);

}
export function JSXClosingElement(node) {
function JSXClosingElement(node) {
this.token("</");

@@ -91,6 +111,6 @@ this.print(node.name, node);

}
export function JSXEmptyExpression() {
function JSXEmptyExpression() {
this.printInnerComments();
}
export function JSXFragment(node) {
function JSXFragment(node) {
this.print(node.openingFragment, node);

@@ -104,7 +124,7 @@ this.indent();

}
export function JSXOpeningFragment() {
function JSXOpeningFragment() {
this.tokenChar(60);
this.tokenChar(62);
}
export function JSXClosingFragment() {
function JSXClosingFragment() {
this.token("</");

@@ -111,0 +131,0 @@ this.tokenChar(62);

@@ -1,6 +0,19 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArrowFunctionExpression = ArrowFunctionExpression;
exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
exports._functionHead = _functionHead;
exports._methodHead = _methodHead;
exports._param = _param;
exports._parameters = _parameters;
exports._params = _params;
exports._predicate = _predicate;
var _t = require("@babel/types");
const {
isIdentifier
} = _t;
export function _params(node, idNode, parentNode) {
function _params(node, idNode, parentNode) {
this.print(node.typeParameters, node);

@@ -18,3 +31,3 @@ const nameInfo = _getFuncIdName.call(this, idNode, parentNode);

}
export function _parameters(parameters, parent) {
function _parameters(parameters, parent) {
const paramLength = parameters.length;

@@ -29,3 +42,3 @@ for (let i = 0; i < paramLength; i++) {

}
export function _param(parameter, parent) {
function _param(parameter, parent) {
this.printJoin(parameter.decorators, parameter);

@@ -38,3 +51,3 @@ this.print(parameter, parent);

}
export function _methodHead(node) {
function _methodHead(node) {
const kind = node.kind;

@@ -67,3 +80,3 @@ const key = node.key;

}
export function _predicate(node, noLineTerminatorAfter) {
function _predicate(node, noLineTerminatorAfter) {
if (node.predicate) {

@@ -77,3 +90,3 @@ if (!node.returnType) {

}
export function _functionHead(node, parent) {
function _functionHead(node, parent) {
if (node.async) {

@@ -98,3 +111,3 @@ this.word("async");

}
export function FunctionExpression(node, parent) {
function FunctionExpression(node, parent) {
this._functionHead(node, parent);

@@ -104,4 +117,3 @@ this.space();

}
export { FunctionExpression as FunctionDeclaration };
export function ArrowFunctionExpression(node, parent) {
function ArrowFunctionExpression(node, parent) {
if (node.async) {

@@ -108,0 +120,0 @@ this.word("async", true);

@@ -1,2 +0,19 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ExportAllDeclaration = ExportAllDeclaration;
exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
exports.ExportNamedDeclaration = ExportNamedDeclaration;
exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
exports.ExportSpecifier = ExportSpecifier;
exports.ImportAttribute = ImportAttribute;
exports.ImportDeclaration = ImportDeclaration;
exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
exports.ImportSpecifier = ImportSpecifier;
exports._printAssertions = _printAssertions;
var _t = require("@babel/types");
const {

@@ -10,3 +27,3 @@ isClassDeclaration,

} = _t;
export function ImportSpecifier(node) {
function ImportSpecifier(node) {
if (node.importKind === "type" || node.importKind === "typeof") {

@@ -24,9 +41,9 @@ this.word(node.importKind);

}
export function ImportDefaultSpecifier(node) {
function ImportDefaultSpecifier(node) {
this.print(node.local, node);
}
export function ExportDefaultSpecifier(node) {
function ExportDefaultSpecifier(node) {
this.print(node.exported, node);
}
export function ExportSpecifier(node) {
function ExportSpecifier(node) {
if (node.exportKind === "type") {

@@ -44,3 +61,3 @@ this.word("type");

}
export function ExportNamespaceSpecifier(node) {
function ExportNamespaceSpecifier(node) {
this.tokenChar(42);

@@ -52,3 +69,3 @@ this.space();

}
export function _printAssertions(node) {
function _printAssertions(node) {
this.word("assert");

@@ -62,3 +79,3 @@ this.space();

}
export function ExportAllDeclaration(node) {
function ExportAllDeclaration(node) {
var _node$assertions;

@@ -89,3 +106,3 @@ this.word("export");

}
export function ExportNamedDeclaration(node) {
function ExportNamedDeclaration(node) {
maybePrintDecoratorsBeforeExport(this, node);

@@ -143,3 +160,3 @@ this.word("export");

}
export function ExportDefaultDeclaration(node) {
function ExportDefaultDeclaration(node) {
maybePrintDecoratorsBeforeExport(this, node);

@@ -155,3 +172,3 @@ this.word("export");

}
export function ImportDeclaration(node) {
function ImportDeclaration(node) {
var _node$assertions3;

@@ -217,3 +234,3 @@ this.word("import");

}
export function ImportAttribute(node) {
function ImportAttribute(node) {
this.print(node.key);

@@ -224,3 +241,3 @@ this.tokenChar(58);

}
export function ImportNamespaceSpecifier(node) {
function ImportNamespaceSpecifier(node) {
this.tokenChar(42);

@@ -227,0 +244,0 @@ this.space();

@@ -1,2 +0,25 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BreakStatement = BreakStatement;
exports.CatchClause = CatchClause;
exports.ContinueStatement = ContinueStatement;
exports.DebuggerStatement = DebuggerStatement;
exports.DoWhileStatement = DoWhileStatement;
exports.ForOfStatement = exports.ForInStatement = void 0;
exports.ForStatement = ForStatement;
exports.IfStatement = IfStatement;
exports.LabeledStatement = LabeledStatement;
exports.ReturnStatement = ReturnStatement;
exports.SwitchCase = SwitchCase;
exports.SwitchStatement = SwitchStatement;
exports.ThrowStatement = ThrowStatement;
exports.TryStatement = TryStatement;
exports.VariableDeclaration = VariableDeclaration;
exports.VariableDeclarator = VariableDeclarator;
exports.WhileStatement = WhileStatement;
exports.WithStatement = WithStatement;
var _t = require("@babel/types");
const {

@@ -8,3 +31,3 @@ isFor,

} = _t;
export function WithStatement(node) {
function WithStatement(node) {
this.word("with");

@@ -17,3 +40,3 @@ this.space();

}
export function IfStatement(node) {
function IfStatement(node) {
this.word("if");

@@ -53,3 +76,3 @@ this.space();

}
export function ForStatement(node) {
function ForStatement(node) {
this.word("for");

@@ -74,3 +97,3 @@ this.space();

}
export function WhileStatement(node) {
function WhileStatement(node) {
this.word("while");

@@ -101,5 +124,7 @@ this.space();

}
export const ForInStatement = ForXStatement;
export const ForOfStatement = ForXStatement;
export function DoWhileStatement(node) {
const ForInStatement = ForXStatement;
exports.ForInStatement = ForInStatement;
const ForOfStatement = ForXStatement;
exports.ForOfStatement = ForOfStatement;
function DoWhileStatement(node) {
this.word("do");

@@ -123,19 +148,19 @@ this.space();

}
export function BreakStatement(node) {
function BreakStatement(node) {
this.word("break");
printStatementAfterKeyword(this, node.label, node, true);
}
export function ContinueStatement(node) {
function ContinueStatement(node) {
this.word("continue");
printStatementAfterKeyword(this, node.label, node, true);
}
export function ReturnStatement(node) {
function ReturnStatement(node) {
this.word("return");
printStatementAfterKeyword(this, node.argument, node, false);
}
export function ThrowStatement(node) {
function ThrowStatement(node) {
this.word("throw");
printStatementAfterKeyword(this, node.argument, node, false);
}
export function LabeledStatement(node) {
function LabeledStatement(node) {
this.print(node.label, node);

@@ -146,3 +171,3 @@ this.tokenChar(58);

}
export function TryStatement(node) {
function TryStatement(node) {
this.word("try");

@@ -164,3 +189,3 @@ this.space();

}
export function CatchClause(node) {
function CatchClause(node) {
this.word("catch");

@@ -177,3 +202,3 @@ this.space();

}
export function SwitchStatement(node) {
function SwitchStatement(node) {
this.word("switch");

@@ -194,3 +219,3 @@ this.space();

}
export function SwitchCase(node) {
function SwitchCase(node) {
if (node.test) {

@@ -212,7 +237,7 @@ this.word("case");

}
export function DebuggerStatement() {
function DebuggerStatement() {
this.word("debugger");
this.semicolon();
}
export function VariableDeclaration(node, parent) {
function VariableDeclaration(node, parent) {
if (node.declare) {

@@ -251,3 +276,3 @@ this.word("declare");

}
export function VariableDeclarator(node) {
function VariableDeclarator(node) {
this.print(node.id, node);

@@ -254,0 +279,0 @@ if (node.definite) this.tokenChar(33);

@@ -1,2 +0,10 @@

export function TaggedTemplateExpression(node) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TaggedTemplateExpression = TaggedTemplateExpression;
exports.TemplateElement = TemplateElement;
exports.TemplateLiteral = TemplateLiteral;
function TaggedTemplateExpression(node) {
this.print(node.tag, node);

@@ -6,3 +14,3 @@ this.print(node.typeParameters, node);

}
export function TemplateElement(node, parent) {
function TemplateElement(node, parent) {
const isFirst = parent.quasis[0] === node;

@@ -13,3 +21,3 @@ const isLast = parent.quasis[parent.quasis.length - 1] === node;

}
export function TemplateLiteral(node) {
function TemplateLiteral(node) {
const quasis = node.quasis;

@@ -16,0 +24,0 @@ for (let i = 0; i < quasis.length; i++) {

@@ -1,2 +0,28 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArgumentPlaceholder = ArgumentPlaceholder;
exports.ArrayPattern = exports.ArrayExpression = ArrayExpression;
exports.BigIntLiteral = BigIntLiteral;
exports.BooleanLiteral = BooleanLiteral;
exports.DecimalLiteral = DecimalLiteral;
exports.Identifier = Identifier;
exports.NullLiteral = NullLiteral;
exports.NumericLiteral = NumericLiteral;
exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
exports.ObjectMethod = ObjectMethod;
exports.ObjectProperty = ObjectProperty;
exports.PipelineBareFunction = PipelineBareFunction;
exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
exports.PipelineTopicExpression = PipelineTopicExpression;
exports.RecordExpression = RecordExpression;
exports.RegExpLiteral = RegExpLiteral;
exports.SpreadElement = exports.RestElement = RestElement;
exports.StringLiteral = StringLiteral;
exports.TopicReference = TopicReference;
exports.TupleExpression = TupleExpression;
var _t = require("@babel/types");
var _jsesc = require("jsesc");
const {

@@ -6,4 +32,3 @@ isAssignmentPattern,

} = _t;
import jsesc from "jsesc";
export function Identifier(node) {
function Identifier(node) {
var _node$loc;

@@ -13,11 +38,10 @@ this.sourceIdentifierName(((_node$loc = node.loc) == null ? void 0 : _node$loc.identifierName) || node.name);

}
export function ArgumentPlaceholder() {
function ArgumentPlaceholder() {
this.tokenChar(63);
}
export function RestElement(node) {
function RestElement(node) {
this.token("...");
this.print(node.argument, node);
}
export { RestElement as SpreadElement };
export function ObjectExpression(node) {
function ObjectExpression(node) {
const props = node.properties;

@@ -36,4 +60,3 @@ this.tokenChar(123);

}
export { ObjectExpression as ObjectPattern };
export function ObjectMethod(node) {
function ObjectMethod(node) {
this.printJoin(node.decorators, node);

@@ -44,3 +67,3 @@ this._methodHead(node);

}
export function ObjectProperty(node) {
function ObjectProperty(node) {
this.printJoin(node.decorators, node);

@@ -65,3 +88,3 @@ if (node.computed) {

}
export function ArrayExpression(node) {
function ArrayExpression(node) {
const elems = node.elements;

@@ -82,4 +105,3 @@ const len = elems.length;

}
export { ArrayExpression as ArrayPattern };
export function RecordExpression(node) {
function RecordExpression(node) {
const props = node.properties;

@@ -108,3 +130,3 @@ let startToken;

}
export function TupleExpression(node) {
function TupleExpression(node) {
const elems = node.elements;

@@ -134,12 +156,12 @@ const len = elems.length;

}
export function RegExpLiteral(node) {
function RegExpLiteral(node) {
this.word(`/${node.pattern}/${node.flags}`);
}
export function BooleanLiteral(node) {
function BooleanLiteral(node) {
this.word(node.value ? "true" : "false");
}
export function NullLiteral() {
function NullLiteral() {
this.word("null");
}
export function NumericLiteral(node) {
function NumericLiteral(node) {
const raw = this.getPossibleRaw(node);

@@ -149,3 +171,3 @@ const opts = this.format.jsescOption;

if (opts.numbers) {
this.number(jsesc(node.value, opts));
this.number(_jsesc(node.value, opts));
} else if (raw == null) {

@@ -159,3 +181,3 @@ this.number(value);

}
export function StringLiteral(node) {
function StringLiteral(node) {
const raw = this.getPossibleRaw(node);

@@ -166,6 +188,6 @@ if (!this.format.minified && raw !== undefined) {

}
const val = jsesc(node.value, this.format.jsescOption);
const val = _jsesc(node.value, this.format.jsescOption);
this.token(val);
}
export function BigIntLiteral(node) {
function BigIntLiteral(node) {
const raw = this.getPossibleRaw(node);

@@ -178,3 +200,3 @@ if (!this.format.minified && raw !== undefined) {

}
export function DecimalLiteral(node) {
function DecimalLiteral(node) {
const raw = this.getPossibleRaw(node);

@@ -188,3 +210,3 @@ if (!this.format.minified && raw !== undefined) {

const validTopicTokenSet = new Set(["^^", "@@", "^", "%", "#"]);
export function TopicReference() {
function TopicReference() {
const {

@@ -201,9 +223,9 @@ topicToken

}
export function PipelineTopicExpression(node) {
function PipelineTopicExpression(node) {
this.print(node.expression, node);
}
export function PipelineBareFunction(node) {
function PipelineBareFunction(node) {
this.print(node.callee, node);
}
export function PipelinePrimaryTopicReference() {
function PipelinePrimaryTopicReference() {
this.tokenChar(35);

@@ -210,0 +232,0 @@ }

@@ -1,2 +0,75 @@

export function TSTypeAnnotation(node) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TSAnyKeyword = TSAnyKeyword;
exports.TSArrayType = TSArrayType;
exports.TSSatisfiesExpression = exports.TSAsExpression = TSTypeExpression;
exports.TSBigIntKeyword = TSBigIntKeyword;
exports.TSBooleanKeyword = TSBooleanKeyword;
exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
exports.TSConditionalType = TSConditionalType;
exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
exports.TSConstructorType = TSConstructorType;
exports.TSDeclareFunction = TSDeclareFunction;
exports.TSDeclareMethod = TSDeclareMethod;
exports.TSEnumDeclaration = TSEnumDeclaration;
exports.TSEnumMember = TSEnumMember;
exports.TSExportAssignment = TSExportAssignment;
exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
exports.TSExternalModuleReference = TSExternalModuleReference;
exports.TSFunctionType = TSFunctionType;
exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
exports.TSImportType = TSImportType;
exports.TSIndexSignature = TSIndexSignature;
exports.TSIndexedAccessType = TSIndexedAccessType;
exports.TSInferType = TSInferType;
exports.TSInstantiationExpression = TSInstantiationExpression;
exports.TSInterfaceBody = TSInterfaceBody;
exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
exports.TSIntersectionType = TSIntersectionType;
exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
exports.TSLiteralType = TSLiteralType;
exports.TSMappedType = TSMappedType;
exports.TSMethodSignature = TSMethodSignature;
exports.TSModuleBlock = TSModuleBlock;
exports.TSModuleDeclaration = TSModuleDeclaration;
exports.TSNamedTupleMember = TSNamedTupleMember;
exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
exports.TSNeverKeyword = TSNeverKeyword;
exports.TSNonNullExpression = TSNonNullExpression;
exports.TSNullKeyword = TSNullKeyword;
exports.TSNumberKeyword = TSNumberKeyword;
exports.TSObjectKeyword = TSObjectKeyword;
exports.TSOptionalType = TSOptionalType;
exports.TSParameterProperty = TSParameterProperty;
exports.TSParenthesizedType = TSParenthesizedType;
exports.TSPropertySignature = TSPropertySignature;
exports.TSQualifiedName = TSQualifiedName;
exports.TSRestType = TSRestType;
exports.TSStringKeyword = TSStringKeyword;
exports.TSSymbolKeyword = TSSymbolKeyword;
exports.TSThisType = TSThisType;
exports.TSTupleType = TSTupleType;
exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
exports.TSTypeAnnotation = TSTypeAnnotation;
exports.TSTypeAssertion = TSTypeAssertion;
exports.TSTypeLiteral = TSTypeLiteral;
exports.TSTypeOperator = TSTypeOperator;
exports.TSTypeParameter = TSTypeParameter;
exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
exports.TSTypePredicate = TSTypePredicate;
exports.TSTypeQuery = TSTypeQuery;
exports.TSTypeReference = TSTypeReference;
exports.TSUndefinedKeyword = TSUndefinedKeyword;
exports.TSUnionType = TSUnionType;
exports.TSUnknownKeyword = TSUnknownKeyword;
exports.TSVoidKeyword = TSVoidKeyword;
exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
function TSTypeAnnotation(node) {
this.tokenChar(58);

@@ -7,3 +80,3 @@ this.space();

}
export function TSTypeParameterInstantiation(node, parent) {
function TSTypeParameterInstantiation(node, parent) {
this.tokenChar(60);

@@ -16,4 +89,3 @@ this.printList(node.params, node, {});

}
export { TSTypeParameterInstantiation as TSTypeParameterDeclaration };
export function TSTypeParameter(node) {
function TSTypeParameter(node) {
if (node.in) {

@@ -41,3 +113,3 @@ this.word("in");

}
export function TSParameterProperty(node) {
function TSParameterProperty(node) {
if (node.accessibility) {

@@ -53,3 +125,3 @@ this.word(node.accessibility);

}
export function TSDeclareFunction(node, parent) {
function TSDeclareFunction(node, parent) {
if (node.declare) {

@@ -62,7 +134,7 @@ this.word("declare");

}
export function TSDeclareMethod(node) {
function TSDeclareMethod(node) {
this._classMethodHead(node);
this.tokenChar(59);
}
export function TSQualifiedName(node) {
function TSQualifiedName(node) {
this.print(node.left, node);

@@ -72,7 +144,7 @@ this.tokenChar(46);

}
export function TSCallSignatureDeclaration(node) {
function TSCallSignatureDeclaration(node) {
this.tsPrintSignatureDeclarationBase(node);
this.tokenChar(59);
}
export function TSConstructSignatureDeclaration(node) {
function TSConstructSignatureDeclaration(node) {
this.word("new");

@@ -83,3 +155,3 @@ this.space();

}
export function TSPropertySignature(node) {
function TSPropertySignature(node) {
const {

@@ -103,3 +175,3 @@ readonly,

}
export function tsPrintPropertyOrMethodName(node) {
function tsPrintPropertyOrMethodName(node) {
if (node.computed) {

@@ -116,3 +188,3 @@ this.tokenChar(91);

}
export function TSMethodSignature(node) {
function TSMethodSignature(node) {
const {

@@ -129,3 +201,3 @@ kind

}
export function TSIndexSignature(node) {
function TSIndexSignature(node) {
const {

@@ -149,48 +221,48 @@ readonly,

}
export function TSAnyKeyword() {
function TSAnyKeyword() {
this.word("any");
}
export function TSBigIntKeyword() {
function TSBigIntKeyword() {
this.word("bigint");
}
export function TSUnknownKeyword() {
function TSUnknownKeyword() {
this.word("unknown");
}
export function TSNumberKeyword() {
function TSNumberKeyword() {
this.word("number");
}
export function TSObjectKeyword() {
function TSObjectKeyword() {
this.word("object");
}
export function TSBooleanKeyword() {
function TSBooleanKeyword() {
this.word("boolean");
}
export function TSStringKeyword() {
function TSStringKeyword() {
this.word("string");
}
export function TSSymbolKeyword() {
function TSSymbolKeyword() {
this.word("symbol");
}
export function TSVoidKeyword() {
function TSVoidKeyword() {
this.word("void");
}
export function TSUndefinedKeyword() {
function TSUndefinedKeyword() {
this.word("undefined");
}
export function TSNullKeyword() {
function TSNullKeyword() {
this.word("null");
}
export function TSNeverKeyword() {
function TSNeverKeyword() {
this.word("never");
}
export function TSIntrinsicKeyword() {
function TSIntrinsicKeyword() {
this.word("intrinsic");
}
export function TSThisType() {
function TSThisType() {
this.word("this");
}
export function TSFunctionType(node) {
function TSFunctionType(node) {
this.tsPrintFunctionOrConstructorType(node);
}
export function TSConstructorType(node) {
function TSConstructorType(node) {
if (node.abstract) {

@@ -204,3 +276,3 @@ this.word("abstract");

}
export function tsPrintFunctionOrConstructorType(node) {
function tsPrintFunctionOrConstructorType(node) {
const {

@@ -220,7 +292,7 @@ typeParameters

}
export function TSTypeReference(node) {
function TSTypeReference(node) {
this.print(node.typeName, node, true);
this.print(node.typeParameters, node, true);
}
export function TSTypePredicate(node) {
function TSTypePredicate(node) {
if (node.asserts) {

@@ -238,3 +310,3 @@ this.word("asserts");

}
export function TSTypeQuery(node) {
function TSTypeQuery(node) {
this.word("typeof");

@@ -247,6 +319,6 @@ this.space();

}
export function TSTypeLiteral(node) {
function TSTypeLiteral(node) {
this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
}
export function tsPrintTypeLiteralOrInterfaceBody(members, node) {
function tsPrintTypeLiteralOrInterfaceBody(members, node) {
tsPrintBraced(this, members, node);

@@ -268,7 +340,7 @@ }

}
export function TSArrayType(node) {
function TSArrayType(node) {
this.print(node.elementType, node, true);
this.token("[]");
}
export function TSTupleType(node) {
function TSTupleType(node) {
this.tokenChar(91);

@@ -278,11 +350,11 @@ this.printList(node.elementTypes, node);

}
export function TSOptionalType(node) {
function TSOptionalType(node) {
this.print(node.typeAnnotation, node);
this.tokenChar(63);
}
export function TSRestType(node) {
function TSRestType(node) {
this.token("...");
this.print(node.typeAnnotation, node);
}
export function TSNamedTupleMember(node) {
function TSNamedTupleMember(node) {
this.print(node.label, node);

@@ -294,6 +366,6 @@ if (node.optional) this.tokenChar(63);

}
export function TSUnionType(node) {
function TSUnionType(node) {
tsPrintUnionOrIntersectionType(this, node, "|");
}
export function TSIntersectionType(node) {
function TSIntersectionType(node) {
tsPrintUnionOrIntersectionType(this, node, "&");

@@ -310,3 +382,3 @@ }

}
export function TSConditionalType(node) {
function TSConditionalType(node) {
this.print(node.checkType);

@@ -326,3 +398,3 @@ this.space();

}
export function TSInferType(node) {
function TSInferType(node) {
this.token("infer");

@@ -332,3 +404,3 @@ this.space();

}
export function TSParenthesizedType(node) {
function TSParenthesizedType(node) {
this.tokenChar(40);

@@ -338,3 +410,3 @@ this.print(node.typeAnnotation, node);

}
export function TSTypeOperator(node) {
function TSTypeOperator(node) {
this.word(node.operator);

@@ -344,3 +416,3 @@ this.space();

}
export function TSIndexedAccessType(node) {
function TSIndexedAccessType(node) {
this.print(node.objectType, node, true);

@@ -351,3 +423,3 @@ this.tokenChar(91);

}
export function TSMappedType(node) {
function TSMappedType(node) {
const {

@@ -394,10 +466,10 @@ nameType,

}
export function TSLiteralType(node) {
function TSLiteralType(node) {
this.print(node.literal, node);
}
export function TSExpressionWithTypeArguments(node) {
function TSExpressionWithTypeArguments(node) {
this.print(node.expression, node);
this.print(node.typeParameters, node);
}
export function TSInterfaceDeclaration(node) {
function TSInterfaceDeclaration(node) {
const {

@@ -427,6 +499,6 @@ declare,

}
export function TSInterfaceBody(node) {
function TSInterfaceBody(node) {
this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
}
export function TSTypeAliasDeclaration(node) {
function TSTypeAliasDeclaration(node) {
const {

@@ -466,4 +538,3 @@ declare,

}
export { TSTypeExpression as TSAsExpression, TSTypeExpression as TSSatisfiesExpression };
export function TSTypeAssertion(node) {
function TSTypeAssertion(node) {
const {

@@ -479,7 +550,7 @@ typeAnnotation,

}
export function TSInstantiationExpression(node) {
function TSInstantiationExpression(node) {
this.print(node.expression, node);
this.print(node.typeParameters, node);
}
export function TSEnumDeclaration(node) {
function TSEnumDeclaration(node) {
const {

@@ -505,3 +576,3 @@ declare,

}
export function TSEnumMember(node) {
function TSEnumMember(node) {
const {

@@ -520,3 +591,3 @@ id,

}
export function TSModuleDeclaration(node) {
function TSModuleDeclaration(node) {
const {

@@ -548,6 +619,6 @@ declare,

}
export function TSModuleBlock(node) {
function TSModuleBlock(node) {
tsPrintBraced(this, node.body, node);
}
export function TSImportType(node) {
function TSImportType(node) {
const {

@@ -570,3 +641,3 @@ argument,

}
export function TSImportEqualsDeclaration(node) {
function TSImportEqualsDeclaration(node) {
const {

@@ -590,3 +661,3 @@ isExport,

}
export function TSExternalModuleReference(node) {
function TSExternalModuleReference(node) {
this.token("require(");

@@ -596,7 +667,7 @@ this.print(node.expression, node);

}
export function TSNonNullExpression(node) {
function TSNonNullExpression(node) {
this.print(node.expression, node);
this.tokenChar(33);
}
export function TSExportAssignment(node) {
function TSExportAssignment(node) {
this.word("export");

@@ -609,3 +680,3 @@ this.space();

}
export function TSNamespaceExportDeclaration(node) {
function TSNamespaceExportDeclaration(node) {
this.word("export");

@@ -619,3 +690,3 @@ this.space();

}
export function tsPrintSignatureDeclarationBase(node) {
function tsPrintSignatureDeclarationBase(node) {
const {

@@ -632,3 +703,3 @@ typeParameters

}
export function tsPrintClassMemberModifiers(node) {
function tsPrintClassMemberModifiers(node) {
const isField = node.type === "ClassAccessorProperty" || node.type === "ClassProperty";

@@ -635,0 +706,0 @@ if (isField && node.declare) {

@@ -1,7 +0,14 @@

import SourceMap from "./source-map.js";
import Printer from "./printer.js";
class Generator extends Printer {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CodeGenerator = void 0;
exports.default = generate;
var _sourceMap = require("./source-map");
var _printer = require("./printer");
class Generator extends _printer.default {
constructor(ast, opts = {}, code) {
const format = normalizeOptions(code, opts);
const map = opts.sourceMaps ? new SourceMap(opts, code) : null;
const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null;
super(format, map);

@@ -70,3 +77,3 @@ this.ast = void 0;

}
export class CodeGenerator {
class CodeGenerator {
constructor(ast, opts, code) {

@@ -80,3 +87,4 @@ this._generator = void 0;

}
export default function generate(ast, opts, code) {
exports.CodeGenerator = CodeGenerator;
function generate(ast, opts, code) {
const gen = new Generator(ast, opts, code);

@@ -83,0 +91,0 @@ return gen.generate();

@@ -1,4 +0,13 @@

import * as whitespace from "./whitespace.js";
import * as parens from "./parentheses.js";
import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.needsParens = needsParens;
exports.needsWhitespace = needsWhitespace;
exports.needsWhitespaceAfter = needsWhitespaceAfter;
exports.needsWhitespaceBefore = needsWhitespaceBefore;
var whitespace = require("./whitespace");
var parens = require("./parentheses");
var _t = require("@babel/types");
const {

@@ -44,3 +53,3 @@ FLIPPED_ALIAS_KEYS,

}
export function needsWhitespace(node, parent, type) {
function needsWhitespace(node, parent, type) {
if (!node) return false;

@@ -56,9 +65,9 @@ if (isExpressionStatement(node)) {

}
export function needsWhitespaceBefore(node, parent) {
function needsWhitespaceBefore(node, parent) {
return needsWhitespace(node, parent, 1);
}
export function needsWhitespaceAfter(node, parent) {
function needsWhitespaceAfter(node, parent) {
return needsWhitespace(node, parent, 2);
}
export function needsParens(node, parent, printStack) {
function needsParens(node, parent, printStack) {
if (!parent) return false;

@@ -65,0 +74,0 @@ if (isNewExpression(parent) && parent.callee === node) {

@@ -1,2 +0,31 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArrowFunctionExpression = ArrowFunctionExpression;
exports.AssignmentExpression = AssignmentExpression;
exports.Binary = Binary;
exports.BinaryExpression = BinaryExpression;
exports.ClassExpression = ClassExpression;
exports.ConditionalExpression = ConditionalExpression;
exports.DoExpression = DoExpression;
exports.FunctionExpression = FunctionExpression;
exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
exports.Identifier = Identifier;
exports.LogicalExpression = LogicalExpression;
exports.NullableTypeAnnotation = NullableTypeAnnotation;
exports.ObjectExpression = ObjectExpression;
exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
exports.SequenceExpression = SequenceExpression;
exports.TSTypeAssertion = exports.TSSatisfiesExpression = exports.TSAsExpression = TSAsExpression;
exports.TSInferType = TSInferType;
exports.TSInstantiationExpression = TSInstantiationExpression;
exports.TSIntersectionType = exports.TSUnionType = TSUnionType;
exports.UnaryLike = UnaryLike;
exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
exports.UpdateExpression = UpdateExpression;
exports.AwaitExpression = exports.YieldExpression = YieldExpression;
var _t = require("@babel/types");
const {

@@ -90,19 +119,19 @@ isArrayTypeAnnotation,

const hasPostfixPart = (node, parent) => (isMemberExpression(parent) || isOptionalMemberExpression(parent)) && parent.object === node || (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent)) && parent.callee === node || isTaggedTemplateExpression(parent) && parent.tag === node || isTSNonNullExpression(parent);
export function NullableTypeAnnotation(node, parent) {
function NullableTypeAnnotation(node, parent) {
return isArrayTypeAnnotation(parent);
}
export function FunctionTypeAnnotation(node, parent, printStack) {
function FunctionTypeAnnotation(node, parent, printStack) {
if (printStack.length < 3) return;
return isUnionTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]);
}
export function UpdateExpression(node, parent) {
function UpdateExpression(node, parent) {
return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);
}
export function ObjectExpression(node, parent, printStack) {
function ObjectExpression(node, parent, printStack) {
return isFirstInContext(printStack, 1 | 2);
}
export function DoExpression(node, parent, printStack) {
function DoExpression(node, parent, printStack) {
return !node.async && isFirstInContext(printStack, 1);
}
export function Binary(node, parent) {
function Binary(node, parent) {
if (node.operator === "**" && isBinaryExpression(parent, {

@@ -129,7 +158,6 @@ operator: "**"

}
export function UnionTypeAnnotation(node, parent) {
function UnionTypeAnnotation(node, parent) {
return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation(parent);
}
export { UnionTypeAnnotation as IntersectionTypeAnnotation };
export function OptionalIndexedAccessType(node, parent) {
function OptionalIndexedAccessType(node, parent) {
return isIndexedAccessType(parent, {

@@ -139,20 +167,18 @@ objectType: node

}
export function TSAsExpression() {
function TSAsExpression() {
return true;
}
export { TSAsExpression as TSSatisfiesExpression, TSAsExpression as TSTypeAssertion };
export function TSUnionType(node, parent) {
function TSUnionType(node, parent) {
return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent);
}
export { TSUnionType as TSIntersectionType };
export function TSInferType(node, parent) {
function TSInferType(node, parent) {
return isTSArrayType(parent) || isTSOptionalType(parent);
}
export function TSInstantiationExpression(node, parent) {
function TSInstantiationExpression(node, parent) {
return (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent) || isTSInstantiationExpression(parent)) && !!parent.typeParameters;
}
export function BinaryExpression(node, parent) {
function BinaryExpression(node, parent) {
return node.operator === "in" && (isVariableDeclarator(parent) || isFor(parent));
}
export function SequenceExpression(node, parent) {
function SequenceExpression(node, parent) {
if (isForStatement(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement(parent) && parent.expression === node) {

@@ -163,10 +189,9 @@ return false;

}
export function YieldExpression(node, parent) {
function YieldExpression(node, parent) {
return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node, parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
}
export { YieldExpression as AwaitExpression };
export function ClassExpression(node, parent, printStack) {
function ClassExpression(node, parent, printStack) {
return isFirstInContext(printStack, 1 | 4);
}
export function UnaryLike(node, parent) {
function UnaryLike(node, parent) {
return hasPostfixPart(node, parent) || isBinaryExpression(parent, {

@@ -177,9 +202,9 @@ operator: "**",

}
export function FunctionExpression(node, parent, printStack) {
function FunctionExpression(node, parent, printStack) {
return isFirstInContext(printStack, 1 | 4);
}
export function ArrowFunctionExpression(node, parent) {
function ArrowFunctionExpression(node, parent) {
return isExportDeclaration(parent) || ConditionalExpression(node, parent);
}
export function ConditionalExpression(node, parent) {
function ConditionalExpression(node, parent) {
if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, {

@@ -192,3 +217,3 @@ test: node

}
export function OptionalMemberExpression(node, parent) {
function OptionalMemberExpression(node, parent) {
return isCallExpression(parent, {

@@ -200,4 +225,3 @@ callee: node

}
export { OptionalMemberExpression as OptionalCallExpression };
export function AssignmentExpression(node, parent) {
function AssignmentExpression(node, parent) {
if (isObjectPattern(node.left)) {

@@ -209,3 +233,3 @@ return true;

}
export function LogicalExpression(node, parent) {
function LogicalExpression(node, parent) {
if (isTSTypeExpression(parent)) return true;

@@ -224,3 +248,3 @@ switch (node.operator) {

}
export function Identifier(node, parent, printStack) {
function Identifier(node, parent, printStack) {
var _node$extra;

@@ -227,0 +251,0 @@ if ((_node$extra = node.extra) != null && _node$extra.parenthesized && isAssignmentExpression(parent, {

@@ -1,2 +0,8 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.nodes = void 0;
var _t = require("@babel/types");
const {

@@ -60,3 +66,3 @@ FLIPPED_ALIAS_KEYS,

}
export const nodes = {
const nodes = {
AssignmentExpression(node) {

@@ -110,2 +116,3 @@ const state = crawl(node.right);

};
exports.nodes = nodes;
nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {

@@ -112,0 +119,0 @@ if (parent.properties[0] === node) {

@@ -1,4 +0,12 @@

import Buffer from "./buffer.js";
import * as n from "./node/index.js";
import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _buffer = require("./buffer");
var n = require("./node");
var _t = require("@babel/types");
var generatorFunctions = require("./generators");
require("@jridgewell/trace-mapping");
const {

@@ -11,4 +19,2 @@ isFunction,

} = _t;
import * as generatorFunctions from "./generators/index.js";
import "@jridgewell/trace-mapping";
const SCIENTIFIC_NOTATION = /e/i;

@@ -41,3 +47,3 @@ const ZERO_DECIMAL_INTEGER = /\.0+$/;

this.format = format;
this._buf = new Buffer(map);
this._buf = new _buffer.default(map);
this._indentChar = format.indent.style.charCodeAt(0);

@@ -628,3 +634,4 @@ this._indentRepeat = format.indent.style.length;

}
export default Printer;
var _default = Printer;
exports.default = _default;
function commaSeparator() {

@@ -631,0 +638,0 @@ this.tokenChar(44);

@@ -1,4 +0,10 @@

import { GenMapping, maybeAddMapping, setSourceContent, allMappings, toEncodedMap, toDecodedMap } from "@jridgewell/gen-mapping";
import { originalPositionFor, TraceMap } from "@jridgewell/trace-mapping";
export default class SourceMap {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _genMapping = require("@jridgewell/gen-mapping");
var _traceMapping = require("@jridgewell/trace-mapping");
class SourceMap {
constructor(opts, code) {

@@ -13,3 +19,3 @@ var _opts$sourceFileName;

this._inputMap = void 0;
const map = this._map = new GenMapping({
const map = this._map = new _genMapping.GenMapping({
sourceRoot: opts.sourceRoot

@@ -20,3 +26,3 @@ });

if (opts.inputSourceMap) {
this._inputMap = new TraceMap(opts.inputSourceMap);
this._inputMap = new _traceMapping.TraceMap(opts.inputSourceMap);
const resolvedSources = this._inputMap.resolvedSources;

@@ -26,3 +32,3 @@ if (resolvedSources.length) {

var _this$_inputMap$sourc;
setSourceContent(map, resolvedSources[i], (_this$_inputMap$sourc = this._inputMap.sourcesContent) == null ? void 0 : _this$_inputMap$sourc[i]);
(0, _genMapping.setSourceContent)(map, resolvedSources[i], (_this$_inputMap$sourc = this._inputMap.sourcesContent) == null ? void 0 : _this$_inputMap$sourc[i]);
}

@@ -32,6 +38,6 @@ }

if (typeof code === "string" && !opts.inputSourceMap) {
setSourceContent(map, this._sourceFileName, code);
(0, _genMapping.setSourceContent)(map, this._sourceFileName, code);
} else if (typeof code === "object") {
for (const sourceFileName of Object.keys(code)) {
setSourceContent(map, sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
(0, _genMapping.setSourceContent)(map, sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
}

@@ -41,9 +47,9 @@ }

get() {
return toEncodedMap(this._map);
return (0, _genMapping.toEncodedMap)(this._map);
}
getDecoded() {
return toDecodedMap(this._map);
return (0, _genMapping.toDecodedMap)(this._map);
}
getRawMappings() {
return this._rawMappings || (this._rawMappings = allMappings(this._map));
return this._rawMappings || (this._rawMappings = (0, _genMapping.allMappings)(this._map));
}

@@ -56,3 +62,3 @@ mark(generated, line, column, identifierName, identifierNamePos, filename) {

if (this._inputMap) {
originalMapping = originalPositionFor(this._inputMap, {
originalMapping = (0, _traceMapping.originalPositionFor)(this._inputMap, {
line,

@@ -62,3 +68,3 @@ column

if (!originalMapping.name && identifierNamePos) {
const originalIdentifierMapping = originalPositionFor(this._inputMap, identifierNamePos);
const originalIdentifierMapping = (0, _traceMapping.originalPositionFor)(this._inputMap, identifierNamePos);
if (originalIdentifierMapping.name) {

@@ -76,3 +82,3 @@ identifierName = originalIdentifierMapping.name;

}
maybeAddMapping(this._map, {
(0, _genMapping.maybeAddMapping)(this._map, {
name: identifierName,

@@ -85,3 +91,4 @@ generated,

}
exports.default = SourceMap;
//# sourceMappingURL=source-map.js.map
{
"name": "@babel/generator",
"version": "7.21.4-esm.2",
"version": "7.21.4-esm.3",
"description": "Turns an AST into code.",

@@ -22,3 +22,3 @@ "author": "The Babel Team (https://babel.dev/team)",

"dependencies": {
"@babel/types": "7.21.4-esm.2",
"@babel/types": "7.21.4-esm.3",
"@jridgewell/gen-mapping": "^0.3.2",

@@ -29,4 +29,4 @@ "@jridgewell/trace-mapping": "^0.3.17",

"devDependencies": {
"@babel/helper-fixtures": "7.21.4-esm.2",
"@babel/parser": "7.21.4-esm.2",
"@babel/helper-fixtures": "7.21.4-esm.3",
"@babel/parser": "7.21.4-esm.3",
"@types/jsesc": "^2.5.0",

@@ -33,0 +33,0 @@ "charcodes": "^0.2.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc