Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typecheck updates & fixes in src/language-js #8759

Merged
merged 82 commits into from Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from 79 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
d2e5a9e
add @types/node to devDependencies
brodybits Jul 16, 2020
4bde973
import assert type in src/language-js/needs-parens.js
brodybits Jul 16, 2020
1959b8e
import assert type in src/language-js/printer-estree.js
brodybits Jul 16, 2020
cf8fd21
typedef Doc type in src/document/index.js
brodybits Jul 16, 2020
6fde6d1
import & use Doc type in src/language-js/print/module.js
brodybits Jul 16, 2020
aed44b2
import & use Doc type in src/language-js/printer-estree.js
brodybits Jul 16, 2020
8b420bf
define & use 2 JSDoc types in src/language-js/utils.js
brodybits Jul 16, 2020
f510935
add type comments to hasLeadingComment in src/language-js/comments.js
brodybits Jul 16, 2020
865f365
cleanup: JSDoc items to beginning of src/language-js/print/ternary.js
brodybits Jul 16, 2020
9abf8a1
`@typedef {any} Option` in src/language-js/print/ternary.js (TBD ...)
brodybits Jul 16, 2020
a728b7e
fix(types): value condition in src/language-js/printer-estree.js
brodybits Jul 16, 2020
d307f74
fix(types): remove extra args from internal plusOne & plusTwo calls
brodybits Jul 16, 2020
eefa0de
fix(types): remove extra arg in src/language-js/print/member-chain.js
brodybits Jul 16, 2020
a5d5ee7
fix(types): add value conditions in src/language-js/comments.js
brodybits Jul 16, 2020
171343a
fix(types): value condition in src/language-js/print/member-chain.js
brodybits Jul 16, 2020
82e9caa
fix(types): add a type condition in src/language-js/printer-estree.js
brodybits Jul 16, 2020
3862b26
fix(types): add a value condition in src/language-js/utils.js
brodybits Jul 16, 2020
ba4148b
ignore type issue in src/common/parser-create-error.js - TBD (...)
brodybits Jul 16, 2020
46e7b6d
add @ts-ignore comment to src/language-js/utils.js (TBD ...)
brodybits Jul 16, 2020
33bcf98
add @ts-ignore comments to src/language-js/print/call-arguments.js
brodybits Jul 16, 2020
9a0c756
remove src/language-js from exclude in tsconfig.json
brodybits Jul 16, 2020
e2cc79b
cleanup: remove src/common/parser-create-error.js from tsconfig.json
brodybits Jul 16, 2020
3ae14db
cleanup: add blank lines to src/language-js/print/module.js
brodybits Jul 16, 2020
7a44932
cleanup: add blank lines to src/language-js/printer-estree.js
brodybits Jul 16, 2020
ea6c5ae
extra cleanup: specific import of assert type in src/main/comments.js
brodybits Jul 16, 2020
965b614
extra cleanup: add blank lines to src/main/comments.js
brodybits Jul 16, 2020
571b60a
Merge branch 'master' of https://github.com/prettier/prettier into la…
brodybits Aug 5, 2020
f4a7c06
extra cleanup: fix ordering of eslint-plugin-* in devDependencies
brodybits Aug 5, 2020
c3701ed
update @types/node -> 14.0.27 in devDependencies
brodybits Aug 5, 2020
5e69ad7
Revert "define & use 2 JSDoc types in src/language-js/utils.js"
brodybits Aug 10, 2020
51b3382
Merge branch 'master' of https://github.com/prettier/prettier into la…
brodybits Aug 10, 2020
3babd0e
use specific types in 2 functions in src/language-js/utils.js
brodybits Aug 10, 2020
b6decaf
add "TSESTree" to cspell.json
brodybits Aug 10, 2020
0a7e566
add @babel/types to devDependencies
brodybits Aug 10, 2020
95d7ff6
add @typescript-eslint/types to devDependencies
brodybits Aug 10, 2020
e293270
add @types/estree to devDependencies
brodybits Aug 10, 2020
098ef04
Fix typecheck
fisker Aug 10, 2020
0ffb531
get rid of ESTreeNode & remove a @ts-ignore from regexpPattern const
brodybits Aug 10, 2020
be02bca
cleanup JSDoc typedefs in src/language-js/utils.js
brodybits Aug 10, 2020
52add90
Extract types to seperate file, add more checks
fisker Aug 10, 2020
1cefd9c
Merge branch 'language-js-jsdoc-types' of https://github.com/brodybit…
fisker Aug 10, 2020
d865280
Rename `TSESTree`, export ESTree, Babel, TSTree, NGTree
fisker Aug 10, 2020
895ce87
Fix 2 `todo`s
fisker Aug 10, 2020
9bf9af3
Merge branch 'master' of https://github.com/prettier/prettier into la…
brodybits Aug 10, 2020
5e7c3ce
cleanup: add blank lines to src/language-js/utils.js
brodybits Aug 10, 2020
11b72c4
cleanup comments for 2 functions in src/language-js/utils.js
brodybits Aug 10, 2020
002d065
remove ESTree.Node option not needed in Node type in estree.d.ts
brodybits Aug 10, 2020
a620d67
remove `@ts-ignore` no longer needed from src/language-js/utils.js
brodybits Aug 10, 2020
ebd102f
Revert "remove ESTree.Node option not needed in Node type in estree.d…
brodybits Aug 10, 2020
f8483ad
add `@ts-ignore` back into src/language-js/utils.js
brodybits Aug 10, 2020
cd6ae5a
Fix `ts-ignore`
fisker Aug 11, 2020
d41c75a
More type check
fisker Aug 11, 2020
a66e43a
fix
fisker Aug 11, 2020
736dc79
add blank line to src/language-js/types/estree.d.ts
brodybits Aug 11, 2020
d5da9b6
Merge branch 'master' of https://github.com/prettier/prettier into la…
brodybits Aug 11, 2020
5cc4cdc
Fix estree.d.ts
fisker Aug 11, 2020
3cb1743
Merge branch 'language-js-jsdoc-types' of https://github.com/brodybit…
fisker Aug 11, 2020
21f9358
Merge branch 'master' of https://github.com/prettier/prettier into la…
brodybits Aug 11, 2020
8eb54e4
add blank line to estree.d.ts
brodybits Aug 11, 2020
f95fb88
update PrettierEsNode type
brodybits Aug 11, 2020
ddc404a
combined Prettier Node type (quick update)
brodybits Aug 11, 2020
e0ef929
fix Prettier Node type using ReadonlyArray<PrettierEsComment> types
brodybits Aug 11, 2020
ea68916
rename estree.d.ts -> ast.d.ts in src/language-js/types
brodybits Aug 11, 2020
767a909
update TemplateLiteral type
brodybits Aug 11, 2020
954fd9b
update Comment type, replacing PrettierEsComment
brodybits Aug 11, 2020
ce5c4cb
remove leadingComments from Node type
brodybits Aug 11, 2020
a440d85
update @typescript-eslint/types -> 3.9.0
brodybits Aug 12, 2020
8ac1080
Merge branch 'master' of https://github.com/prettier/prettier into la…
brodybits Aug 12, 2020
062f8b7
WORKAROUND PATCH for typescript-eslint/typescript-eslint#2388
brodybits Aug 12, 2020
a4c02af
simplify import of TSESTree type from `@typescript-eslint/types`
brodybits Aug 12, 2020
d988fcf
add d.ts extension to lint:prettier script
brodybits Aug 12, 2020
ea7d224
FIX & UPDATE WORKAROUND HACK for typescript-eslint/typescript-eslint#…
brodybits Aug 12, 2020
983a099
add extra & comment fields to all exported AST node types in ast.d.ts
brodybits Aug 12, 2020
435b9c3
fixup! add extra & comment fields to all exported AST node types in a…
brodybits Aug 12, 2020
cd52842
Revert "rename estree.d.ts -> ast.d.ts in src/language-js/types"
brodybits Aug 12, 2020
5414a62
Add types to `Node.extra`, remove internal types
fisker Aug 12, 2020
8a6e970
Merge branch 'master' of https://github.com/prettier/prettier into la…
brodybits Aug 18, 2020
c6662a6
update @types/node -> 14.6.0 in devDependencies
brodybits Aug 18, 2020
83bd956
update @typescript-eslint/types -> 3.9.1 in devDependencies
brodybits Aug 18, 2020
5346498
Revert "fix(types): remove extra args from internal plusOne & plusTwo…
brodybits Aug 19, 2020
1979c45
Merge branch 'master' of https://github.com/prettier/prettier into la…
brodybits Aug 19, 2020
29b43a7
Merge branch 'master' into language-js-jsdoc-types
brodybits Aug 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cspell.json
Expand Up @@ -354,6 +354,7 @@
"Transloadit",
"TSAs",
"tsep",
"TSESTree",
"TSJS",
"tslib",
"typeahead",
Expand Down
6 changes: 5 additions & 1 deletion package.json
Expand Up @@ -85,13 +85,17 @@
"devDependencies": {
"@babel/core": "7.11.1",
"@babel/preset-env": "7.11.0",
"@babel/types": "7.11.0",
"@glimmer/reference": "0.56.1",
"@rollup/plugin-alias": "3.1.1",
"@rollup/plugin-babel": "5.2.0",
"@rollup/plugin-commonjs": "14.0.0",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "9.0.0",
"@rollup/plugin-replace": "2.3.3",
"@types/estree": "0.0.45",
"@types/node": "14.6.0",
"@typescript-eslint/types": "3.9.1",
"babel-loader": "8.1.0",
"benchmark": "2.1.4",
"builtin-modules": "3.1.0",
Expand Down Expand Up @@ -139,7 +143,7 @@
"lint:typecheck": "tsc",
"lint:eslint": "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly",
"lint:changelog": "node ./scripts/lint-changelog.js",
"lint:prettier": "prettier \"**/*.{md,json,yml,html,css,js}\" \"!test*\" --check",
"lint:prettier": "prettier \"**/*.{md,json,yml,html,css,js,d.ts}\" \"!test*\" --check",
"lint:dist": "eslint --no-eslintrc --no-ignore --env=es6,browser --parser-options=ecmaVersion:2016 \"dist/!(bin-prettier|index|third-party).js\"",
"lint:spellcheck": "cspell \"**/*\" \".github/**/*\"",
"lint:deps": "node ./scripts/check-deps.js",
Expand Down
4 changes: 4 additions & 0 deletions src/document/index.js
@@ -1,5 +1,9 @@
"use strict";

/**
* @typedef {import("./doc-builders").Doc} Doc
*/

module.exports = {
builders: require("./doc-builders"),
printer: require("./doc-printer"),
Expand Down
16 changes: 12 additions & 4 deletions src/language-js/comments.js
Expand Up @@ -578,7 +578,7 @@ function handleCommentAfterArrowParams(text, enclosingNode, comment, options) {
comment,
options.locEnd
);
if (text.slice(index, index + 2) === "=>") {
if (index !== false && text.slice(index, index + 2) === "=>") {
brodybits marked this conversation as resolved.
Show resolved Hide resolved
brodybits marked this conversation as resolved.
Show resolved Hide resolved
addDanglingComment(enclosingNode, comment);
return true;
}
Expand Down Expand Up @@ -672,9 +672,12 @@ function handleLastFunctionArgComments(
text,
options.locEnd(enclosingNode.id)
);
return getNextNonSpaceNonCommentCharacterIndexWithStartIndex(
text,
functionParamLeftParenIndex + 1
return (
functionParamLeftParenIndex !== false &&
getNextNonSpaceNonCommentCharacterIndexWithStartIndex(
text,
functionParamLeftParenIndex + 1
)
);
})();
if (options.locStart(comment) > functionParamRightParenIndex) {
Expand Down Expand Up @@ -930,6 +933,11 @@ function isBlockComment(comment) {
return comment.type === "Block" || comment.type === "CommentBlock";
}

/**
* @param {any} node
* @param {(comment: any) => boolean} fn
* @returns boolean
*/
function hasLeadingComment(node, fn = () => true) {
if (node.leadingComments) {
return node.leadingComments.some(fn);
Expand Down
1 change: 1 addition & 0 deletions src/language-js/needs-parens.js
@@ -1,5 +1,6 @@
"use strict";

/** @type {import("assert")} */
brodybits marked this conversation as resolved.
Show resolved Hide resolved
const assert = require("assert");

const {
Expand Down
2 changes: 1 addition & 1 deletion src/language-js/print/call-arguments.js
Expand Up @@ -159,7 +159,7 @@ function printCallArguments(path, options, print) {
shouldBreakForArrowFunction;

// We want to print the last argument with a special flag
let printedExpanded;
let printedExpanded = [];
brodybits marked this conversation as resolved.
Show resolved Hide resolved
let i = 0;
const printArgument = (argPath) => {
if (shouldGroupFirst && i === 0) {
Expand Down
7 changes: 3 additions & 4 deletions src/language-js/print/member-chain.js
Expand Up @@ -80,10 +80,9 @@ function printMemberChain(path, options, print) {
// if it is cut off by a parenthesis, we only account for one typed empty
// line after that parenthesis
if (nextChar === ")") {
return isNextLineEmptyAfterIndex(
originalText,
nextCharIndex + 1,
options.locEnd
return (
nextCharIndex !== false &&
isNextLineEmptyAfterIndex(originalText, nextCharIndex + 1)
);
}

Expand Down
7 changes: 7 additions & 0 deletions src/language-js/print/module.js
Expand Up @@ -3,15 +3,22 @@
const {
builders: { concat, softline, group, indent, join, line, ifBreak },
} = require("../../document");

const { shouldPrintComma } = require("../utils");

/**
* @typedef {import("../../document").Doc} Doc
*/

function printModuleSource(path, options, print) {
const node = path.getValue();
return node.source ? concat([" from ", path.call(print, "source")]) : "";
}

function printModuleSpecifiers(path, options, print) {
const node = path.getValue();

/** @type{Doc[]} */
const parts = [node.type === "ImportDeclaration" ? " " : ""];

if (node.specifiers && node.specifiers.length > 0) {
Expand Down
27 changes: 17 additions & 10 deletions src/language-js/print/ternary.js
Expand Up @@ -19,6 +19,22 @@ const {
},
} = require("../../document");

/**
* @typedef {import("../../document").Doc} Doc
* @typedef {import("../../common/fast-path")} FastPath
*
* @typedef {any} Options - Prettier options (TBD ...)
*
* @typedef {Object} OperatorOptions
* @property {() => Array<string | Doc>} beforeParts - Parts to print before the `?`.
* @property {(breakClosingParen: boolean) => Array<string | Doc>} afterParts - Parts to print after the conditional expression.
* @property {boolean} shouldCheckJsx - Whether to check for and print in JSX mode.
* @property {string} conditionalNodeType - The type of the conditional expression node, ie "ConditionalExpression" or "TSConditionalType".
* @property {string} consequentNodePropertyName - The property at which the consequent node can be found on the main node, eg "consequent".
* @property {string} alternateNodePropertyName - The property at which the alternate node can be found on the main node, eg "alternate".
* @property {string[]} testNodePropertyNames - The properties at which the test nodes can be found on the main node, eg "test".
*/

// If we have nested conditional expressions, we want to print them in JSX mode
// if there's at least one JSXElement somewhere in the tree.
//
Expand Down Expand Up @@ -118,16 +134,7 @@ function conditionalExpressionChainContainsJSX(node) {
* The following is the shared logic for
* ternary operators, namely ConditionalExpression
* and TSConditionalType
* @typedef {import("../../document/doc-builders").Doc} Doc
* @typedef {Object} OperatorOptions
* @property {() => Array<string | Doc>} beforeParts - Parts to print before the `?`.
* @property {(breakClosingParen: boolean) => Array<string | Doc>} afterParts - Parts to print after the conditional expression.
* @property {boolean} shouldCheckJsx - Whether to check for and print in JSX mode.
* @property {string} conditionalNodeType - The type of the conditional expression node, ie "ConditionalExpression" or "TSConditionalType".
* @property {string} consequentNodePropertyName - The property at which the consequent node can be found on the main node, eg "consequent".
* @property {string} alternateNodePropertyName - The property at which the alternate node can be found on the main node, eg "alternate".
* @property {string[]} testNodePropertyNames - The properties at which the test nodes can be found on the main node, eg "test".
* @param {import("../../common/fast-path")} path - The path to the ConditionalExpression/TSConditionalType node.
* @param {FastPath} path - The path to the ConditionalExpression/TSConditionalType node.
* @param {Options} options - Prettier options
* @param {Function} print - Print function to call recursively
* @param {OperatorOptions} operatorOptions
Expand Down
21 changes: 19 additions & 2 deletions src/language-js/printer-estree.js
@@ -1,5 +1,8 @@
"use strict";

/** @typedef {import("../document").Doc} Doc */

/** @type {import("assert")} */
const assert = require("assert");

// TODO(azz): anything that imports from main shouldn't be in a `language-*` dir.
Expand Down Expand Up @@ -256,7 +259,9 @@ function printPathNoParens(path, options, print, args) {
return htmlBinding;
}

/** @type{Doc[]} */
let parts = [];

switch (n.type) {
case "JsExpressionRoot":
return path.call(print, "node");
Expand Down Expand Up @@ -481,17 +486,23 @@ function printPathNoParens(path, options, print, args) {
// )

const hasJSX = isJSXNode(n.right);
const firstGroupIndex = parts.findIndex((part) => part.type === "group");

const firstGroupIndex = parts.findIndex(
(part) => typeof part !== "string" && part.type === "group"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to do this ? sting.type can't be group

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the typeof part !== "string" condition to resolve a JSDoc type error.

Copy link
Member

@fisker fisker Aug 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, I mean, this can't do in other way ?

I know nothing about JSDoc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have to investigate. I guess we could use @ts-ignore comment for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will part && part.type === "group" work ? It make sense to me .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not because IMHO part could be a string.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said, even if it's string, there is nothing wrong checking String.type ...

I'm going to give up, this JSDoc thing is driving me crazy. 😄

If other contributors think it's okay, I'm okay with it too.

Thank you for explaining this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole JSDoc thing can be a bit crazy. There used to be very few users, now seem to be more and more. I would be happy to post some resources if you like, maybe someday later. We can see it is basically shoehorning quite a bit of TypeScript capabilities into documentation comments. I do really like that it cleanly separates type checking away from executable JavaScript code, can sure be a bit messy though :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No... thanks , I don't want, I don't use typescript either.

brodybits marked this conversation as resolved.
Show resolved Hide resolved
);

// Separate the leftmost expression, possibly with its leading comments.
const headParts = parts.slice(
0,
firstGroupIndex === -1 ? 1 : firstGroupIndex + 1
);

const rest = concat(
parts.slice(headParts.length, hasJSX ? -1 : undefined)
);

const groupId = Symbol("logicalChain-" + ++uid);

const chain = group(
concat([
// Don't include the initial expression in the indentation
Expand Down Expand Up @@ -672,8 +683,9 @@ function printPathNoParens(path, options, print, args) {
options.locEnd
);
return (
nextCharacter !== false &&
options.originalText.slice(nextCharacter, nextCharacter + 2) ===
"=>"
"=>"
);
}
);
Expand Down Expand Up @@ -4046,7 +4058,10 @@ function printReturnType(path, print, options) {

function printExportDeclaration(path, options, print) {
const decl = path.getValue();

const semi = options.semi ? ";" : "";

/** @type{Doc[]} */
const parts = ["export "];

const isDefault = decl.default || decl.type === "ExportDefaultDeclaration";
Expand Down Expand Up @@ -4769,7 +4784,9 @@ function printBinaryishExpressions(
isNested,
isInsideParenthesis
) {
/** @type{Doc[]} */
let parts = [];

const node = path.getValue();

// We treat BinaryExpression and LogicalExpression nodes the same.
Expand Down
97 changes: 97 additions & 0 deletions src/language-js/types/estree.d.ts
@@ -0,0 +1,97 @@
import * as ESTree from "estree";
import * as Babel from "@babel/types";
import { TSESTree } from "@typescript-eslint/types";
import * as NGTree from "angular-estree-parser/lib/types";

// WORKAROUND HACK for typescript-eslint issue:
// https://github.com/typescript-eslint/typescript-eslint/issues/2388
// MUST REMOVE to avoid errors with TypeScript 4.0.0:
import * as ts from "typescript";
declare module "typescript" {
type NamedTupleMember = Node;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will work even with TypeScript 4.x:

Suggested change
type NamedTupleMember = Node;
export interface NamedTupleMember extends Node {}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ExE-Boss. I would actually favor keeping this workaround as-is, errors can remind us to remove it with the TypeScript 4 update. Nice idea, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to remove this entire workaround if typescript-eslint/typescript-eslint#2405 is merged and released. I hope this will be possible.

}

type AdditionalFields = {
extra?: {
parenthesized?: boolean;
parenStart?: number;
raw?: string;
};
comments?: Comment[];
trailingComments?: ReadonlyArray<Comment> | Comment[];
leadingComments?: ReadonlyArray<Comment> | Comment[];
};

export type Comment = (ESTree.Comment | Babel.Comment | TSESTree.Comment) & {
printed?: boolean;
trailing?: boolean;
leading?: boolean;
};

export type Node = (ESTree.Node | Babel.Node | TSESTree.Node | NGTree.NGNode) &
AdditionalFields;

export type TemplateLiteral = (
| ESTree.TemplateLiteral
| Babel.TemplateLiteral
| TSESTree.TemplateLiteral
) &
AdditionalFields;

export type CallExpression = (
| ESTree.CallExpression
| Babel.CallExpression
| TSESTree.CallExpression
) &
AdditionalFields;

export type OptionalCallExpression = (
| Babel.OptionalCallExpression
| TSESTree.OptionalCallExpression
) &
AdditionalFields;

export type MemberExpression = (
| ESTree.MemberExpression
| Babel.MemberExpression
| TSESTree.MemberExpression
) &
AdditionalFields;

export type OptionalMemberExpression = (
| Babel.OptionalMemberExpression
| TSESTree.OptionalMemberExpression
) &
AdditionalFields;

export type Expression = (
| ESTree.Expression
| Babel.Expression
| TSESTree.Expression
) &
AdditionalFields;

export type BindExpression = Babel.BindExpression & AdditionalFields;

export type Property = (ESTree.Property | Babel.Property | TSESTree.Property) &
AdditionalFields;

export type ClassPrivateProperty = Babel.ClassPrivateProperty &
AdditionalFields;

export type ObjectTypeProperty = Babel.ObjectTypeProperty & AdditionalFields;

export type JSXElement = (Babel.JSXElement | TSESTree.JSXElement) &
AdditionalFields;

export type TaggedTemplateExpression = (
| ESTree.TaggedTemplateExpression
| Babel.TaggedTemplateExpression
| TSESTree.TaggedTemplateExpression
) &
AdditionalFields;

export type Literal = (ESTree.Literal | Babel.Literal | TSESTree.Literal) &
AdditionalFields;

export { ESTree, Babel, TSESTree, NGTree };