repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchSuperKeyword.ts | engine/src/matcher/ast/matchSuperKeyword.ts | import ts from "typescript";
import * as b from "../builder";
export const matchSuperKeyword = b.keyword(
"superKeyword",
ts.SyntaxKind.SuperKeyword
);
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchVariableDeclaration.ts | engine/src/matcher/ast/matchVariableDeclaration.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchVariableDeclaration({
debugName = "variableDeclaration",
parent = undefined,
constraints = undefined,
name = undefined,
initializer = undefined,
... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchPropertyAccessExpression.ts | engine/src/matcher/ast/matchPropertyAccessExpression.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchPropertyAccessExpression({
expression = undefined,
name = undefined,
isOptional = undefined,
constraints = undefined,
debugName = "propertyAccessE... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchStatement.ts | engine/src/matcher/ast/matchStatement.ts | import ts from "typescript";
import { isStatement } from "../../ast/Statement";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
import { matchSingleStatementBlock } from "./matchBlock";
export function matchSingleStatementInOptionalBlock({
statement,
... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchBigIntLiteral.ts | engine/src/matcher/ast/matchBigIntLiteral.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchBigIntLiteral({
text = undefined,
constraints = undefined,
debugName = "BigIntLiteral",
}: {
text?: p.PrimitivePredicateLike<string, Context>;
con... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchObjectBindingPattern.ts | engine/src/matcher/ast/matchObjectBindingPattern.ts | import ts from "typescript";
import * as p from "../predicate";
import * as b from "../builder";
import { Context } from "../engine/Context";
export function matchObjectBindingPattern({
elements = undefined,
parent = undefined,
constraints = undefined,
debugName = "objectBindingPattern",
}: {
elements?: p.Op... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchNoSubstitutionTemplateLiteral.ts | engine/src/matcher/ast/matchNoSubstitutionTemplateLiteral.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchNoSubstitutionTemplateLiteral({
text = undefined,
constraints = undefined,
debugName = "NoSubstitutionTemplateLiteral",
}: {
text?: p.PrimitivePredi... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchFunctionExpression.ts | engine/src/matcher/ast/matchFunctionExpression.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchFunctionExpression({
name = undefined,
modifiers = undefined,
typeParameters = undefined,
parameters = undefined,
type = undefined,
isGenerator ... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchOmittedExpression.ts | engine/src/matcher/ast/matchOmittedExpression.ts | import ts from "typescript";
import * as p from "../predicate";
import * as b from "../builder";
import { Context } from "../engine/Context";
export function matchOmittedExpression({
parent = undefined,
constraints = undefined,
debugName = "omittedExpression",
}: {
parent?: p.OptionalPredicate<ts.Node, Context... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchVariableDeclarationList.ts | engine/src/matcher/ast/matchVariableDeclarationList.ts | import ts from "typescript";
import {
getVariableDeclarationKind,
VariableDeclarationKind,
} from "../../ast/VariableDeclarationKind";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchVariableDeclarationList({
debugName = "varia... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchBlockLike.ts | engine/src/matcher/ast/matchBlockLike.ts | import ts from "typescript";
import { isBlockLike } from "../../ast/BlockLike";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchBlockLike({
statements = undefined,
constraints = undefined,
debugName = "blockLike",
}: {
statem... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchFunctionDeclaration.ts | engine/src/matcher/ast/matchFunctionDeclaration.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchFunctionDeclaration({
name = undefined,
modifiers = undefined,
typeParameters = undefined,
parameters = undefined,
type = undefined,
body = unde... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchBinaryExpression.ts | engine/src/matcher/ast/matchBinaryExpression.ts | import ts from "typescript";
import { BinaryOperator } from "../../ast/BinaryOperator";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
import { define } from "../predicate/predicate-wrapper";
export function matchAssignmentExpression({
operator = unde... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchBinding.ts | engine/src/matcher/ast/matchBinding.ts | import ts from "typescript";
import { Binding } from "../../augmentation/scope/Binding";
import { BindingKind } from "../../augmentation/scope/BindingKind";
import { BindingReference } from "../../augmentation/scope/reference/BindingReference";
import * as b from "../builder";
import { Context } from "../engine/Context... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchExpression.ts | engine/src/matcher/ast/matchExpression.ts | import ts from "typescript";
import { isExpression } from "../../ast/Expression";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchExpression({
parent = undefined,
constraints = undefined,
}: {
parent?: p.OptionalPredicate<ts.No... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchClassLike.ts | engine/src/matcher/ast/matchClassLike.ts | import ts from "typescript";
import { Context } from "../engine/Context";
import * as p from "../predicate";
import { matchClassDeclaration } from "./matchClassDeclaration.generated";
import { matchClassExpression } from "./matchClassExpression.generated";
export function matchClassLike(
parameters: {
modifiers?... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchThisExpression.ts | engine/src/matcher/ast/matchThisExpression.ts | import ts from "typescript";
import * as p from "../predicate";
import * as b from "../builder";
import { isThisExpression } from "../../ast/This";
import { Context } from "../engine/Context";
export function matchThisExpression({
constraints = undefined,
debugName = "thisKeyword",
}: {
constraints?: p.OptionalP... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchParameter.ts | engine/src/matcher/ast/matchParameter.ts | import ts from "typescript";
import * as p from "../predicate";
import * as b from "../builder";
import { Context } from "../engine/Context";
export function matchParameter({
name = undefined,
type = undefined,
initializer = undefined,
constraints = undefined,
debugName = "parameter",
}: {
name?: p.Optiona... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchArrayBindingPattern.ts | engine/src/matcher/ast/matchArrayBindingPattern.ts | import ts from "typescript";
import * as p from "../predicate";
import * as b from "../builder";
import { Context } from "../engine/Context";
export function matchArrayBindingPattern({
elements = undefined,
parent = undefined,
constraints = undefined,
debugName = "arrayBindingPattern",
}: {
elements?: p.Opti... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchNumericLiteral.ts | engine/src/matcher/ast/matchNumericLiteral.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchNumericLiteral({
text = undefined,
constraints = undefined,
debugName = "numericLiteral",
}: {
text?: p.PrimitivePredicateLike<string, Context>;
c... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchVariableStatement.ts | engine/src/matcher/ast/matchVariableStatement.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchVariableStatement({
debugName = "variableStatement",
parent = undefined,
constraints = undefined,
declarationList = undefined,
}: {
debugName?: st... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchCallExpression.ts | engine/src/matcher/ast/matchCallExpression.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchCallExpression({
expression = undefined,
args = undefined,
isOptional = undefined,
parent = undefined,
constraints = undefined,
debugName = "cal... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchNullKeyword.ts | engine/src/matcher/ast/matchNullKeyword.ts | import ts from "typescript";
import * as b from "../builder";
export const matchNullKeyword = b.keyword(
"nullKeyword",
ts.SyntaxKind.NullKeyword
);
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchPrivateKeyword.ts | engine/src/matcher/ast/matchPrivateKeyword.ts | import ts from "typescript";
import * as b from "../builder";
export const matchPrivateKeyword = b.keyword(
"privateKeyword",
ts.SyntaxKind.PrivateKeyword
);
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchIdentifier.ts | engine/src/matcher/ast/matchIdentifier.ts | import ts from "typescript";
import { Binding } from "../../augmentation/scope/Binding";
import { BindingReference } from "../../augmentation/scope/reference/BindingReference";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchIdentifi... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchTrueKeyword.ts | engine/src/matcher/ast/matchTrueKeyword.ts | import ts from "typescript";
import * as b from "../builder";
export const matchTrueKeyword = b.keyword(
"trueKeyword",
ts.SyntaxKind.TrueKeyword
);
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchBlock.ts | engine/src/matcher/ast/matchBlock.ts | import ts from "typescript";
import { Context } from "../engine/Context";
import * as p from "../predicate";
import { matchBlock } from "./matchBlock.generated";
import { matchReturnStatement } from "./matchReturnStatement";
export function matchSingleStatementBlock({
statement,
constraints = undefined,
}: {
sta... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchTypeOfExpression.ts | engine/src/matcher/ast/matchTypeOfExpression.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchTypeOfExpression({
expression = undefined,
constraints = undefined,
debugName = "typeOfExpression",
}: {
expression?: p.OptionalPredicate<ts.Express... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchBindingElement.ts | engine/src/matcher/ast/matchBindingElement.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchBindingElement({
name = undefined,
propertyName = undefined,
isRest = undefined,
parent = undefined,
constraints = undefined,
debugName = "bindi... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchFalseKeyword.ts | engine/src/matcher/ast/matchFalseKeyword.ts | import ts from "typescript";
import * as b from "../builder";
export const matchFalseKeyword = b.keyword(
"falseKeyword",
ts.SyntaxKind.FalseKeyword
);
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchBindingPattern.ts | engine/src/matcher/ast/matchBindingPattern.ts | import ts from "typescript";
import * as p from "../predicate";
import * as b from "../builder";
import { Context } from "../engine/Context";
export function matchBindingPattern({
elements = undefined,
parent = undefined,
constraints = undefined,
}: {
elements?: p.OptionalPredicate<ts.NodeArray<ts.ArrayBinding... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/noLeadingComments.ts | engine/src/matcher/ast/noLeadingComments.ts | import ts from "typescript";
import { getLeadingComments } from "../../ast/getLeadingComments";
import * as p from "../predicate";
export function noLeadingComments() {
return p.define(
"noLeadingComments",
(node: ts.Node) => getLeadingComments(node) == null
);
}
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchUnaryExpression.ts | engine/src/matcher/ast/matchUnaryExpression.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchUpdateExpression({
operator = undefined,
operand = undefined,
constraints = undefined,
debugName = "updateExpression",
}: {
operator?: p.Primitive... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchBindingReference.ts | engine/src/matcher/ast/matchBindingReference.ts | import ts from "typescript";
import { Binding } from "../../augmentation/scope/Binding";
import {
BindingReference,
isBindingReference,
} from "../../augmentation/scope/reference/BindingReference";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
expo... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchStaticKeyword.ts | engine/src/matcher/ast/matchStaticKeyword.ts | import ts from "typescript";
import * as b from "../builder";
export const matchStaticKeyword = b.keyword(
"staticKeyword",
ts.SyntaxKind.StaticKeyword
);
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchAsyncKeyword.ts | engine/src/matcher/ast/matchAsyncKeyword.ts | import ts from "typescript";
import * as b from "../builder";
export const matchAsyncKeyword = b.keyword(
"asyncKeyword",
ts.SyntaxKind.AsyncKeyword
);
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/index.ts | engine/src/matcher/ast/index.ts | export { matchArrayBindingPattern as arrayBindingPattern } from "./matchArrayBindingPattern";
export { matchArrayLiteralExpression as arrayLiteralExpression } from "./matchArrayLiteralExpression.generated";
export { matchArrayTypeNode as arrayType } from "./matchArrayTypeNode.generated";
export { matchArrowFunction as ... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchConditionalExpression.ts | engine/src/matcher/ast/matchConditionalExpression.ts | import ts from "typescript";
import * as p from "../predicate";
import * as b from "../builder";
import { Context } from "../engine/Context";
export function matchConditionalExpression({
condition = undefined,
whenTrue = undefined,
whenFalse = undefined,
constraints = undefined,
debugName = "conditionalExpre... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchParenthesizedExpression.ts | engine/src/matcher/ast/matchParenthesizedExpression.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
import { Predicate } from "../predicate/Predicate";
export function matchParenthesizedExpression({
expression = undefined,
constraints = undefined,
debugName = "parenthesi... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchPrivateIdentifier.ts | engine/src/matcher/ast/matchPrivateIdentifier.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
// TODO binding support
export function matchPrivateIdentifier({
text = undefined,
// binding = undefined,
// bindingReference = undefined,
constraints = undefined,
de... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchReturnStatement.ts | engine/src/matcher/ast/matchReturnStatement.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchReturnStatement({
expression = undefined,
constraints = undefined,
debugName = "returnStatement",
}: {
expression?: p.OptionalPredicate<ts.Expressio... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchStringLiteral.ts | engine/src/matcher/ast/matchStringLiteral.ts | import ts from "typescript";
import * as p from "../predicate";
import * as b from "../builder";
import { Context } from "../engine/Context";
export function matchStringLiteral({
text = undefined,
constraints = undefined,
debugName = "stringLiteral",
}: {
text?: p.PrimitivePredicateLike<string, Context>;
con... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/ast/matchElementAccessExpression.ts | engine/src/matcher/ast/matchElementAccessExpression.ts | import ts from "typescript";
import * as b from "../builder";
import { Context } from "../engine/Context";
import * as p from "../predicate";
export function matchElementAccessExpression({
expression = undefined,
argumentExpression = undefined,
isOptional = undefined,
constraints = undefined,
debugName = "el... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/matcher/debug/debugFindMatches.ts | engine/src/matcher/debug/debugFindMatches.ts | import ts from "typescript";
import { getId } from "../../ast/getId";
import { CodeAssistType } from "../../code-assist/CodeAssistType";
import { Context } from "../engine/Context";
import { PatternMatcherEngine } from "../engine/PatternMatcherEngine";
import {
enableTransformationDebugging,
getTree,
} from "../pre... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/NodeTransformationState.ts | engine/src/transformation/NodeTransformationState.ts | export enum NodeTransformationState {
NEW = "new",
MODIFIED = "modified",
ORIGINAL = "original",
}
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/NullTransformation.ts | engine/src/transformation/NullTransformation.ts | import { Node } from "typescript";
import { NullMatch } from "../matcher/engine/NullMatch";
import { ActionZone } from "./ActionZone";
import { Transformation } from "./Transformation";
export class NullTransformation extends Transformation<NullMatch> {
apply() {
return Promise.resolve();
}
getActionZones(m... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/AbstractTransformedNodeTree.ts | engine/src/transformation/AbstractTransformedNodeTree.ts | import _ from "lodash";
import ts from "typescript";
import { factory, NodePath } from "..";
import { isBlockLike } from "../ast/BlockLike";
import { forEachChildWithAttribute } from "../ast/forEachChildWithAttribute.generated";
import { getId } from "../ast/getId";
import { getParentAttribute } from "../ast/getParentA... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | true |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/Transformation.ts | engine/src/transformation/Transformation.ts | import ts from "typescript";
import { AnyMatch } from "../matcher/engine/Match";
import { ActionZone } from "./ActionZone";
import { BlockedZone } from "./BlockedZone";
import { EditorOperation } from "./editor-operation/index";
import { Safety } from "./safety/Safety";
import { Suggestion } from "./Suggestion";
import... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/BlockedZone.ts | engine/src/transformation/BlockedZone.ts | import { Range } from "../util/text/Range";
export type BlockedZone = {
range: Range;
codeActionKindIndex: number;
};
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/Suggestion.ts | engine/src/transformation/Suggestion.ts | import { Range } from "../util/text/Range";
export interface Suggestion {
/**
* Code ranges that should be highlighted when the user wants to see where a suggestion
* is.
*/
readonly highlightRanges: Array<Range>;
/**
* Returns a full description of what your can do with a result.
*/
readonly d... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/getRemovalNode.ts | engine/src/transformation/getRemovalNode.ts | import ts from "typescript";
/**
* Searches for the correct node to remove from an AST if a node should be
* removed, and what replacement to insert (e.g. an omitted expression for
* array destructuring gaps).
*
* The removed node can be any of the node's parents. Removing the returned node
* would leave the AST... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/TransformedNodeTree.test.ts | engine/src/transformation/TransformedNodeTree.test.ts | import ts from "typescript";
import { getId } from "../ast/getId";
import { createParseAndAugmentFunction } from "../augmentation/createParseAndAugmentFunction";
import { TransformedNodeTree } from "./TransformedNodeTree.generated";
const parseAndAugment = async (content: string) => {
const augment = createParseAndA... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/ActionZone.ts | engine/src/transformation/ActionZone.ts | import * as CodeAssistLevel from "../code-assist/CodeAssistLevel";
import { isNotNull } from "../util/collection/isNotNull";
import { Range } from "../util/text/Range";
/**
* An action zone is a range in which the user can invoke the transformation
* as a code action (UI entry point).
*/
export interface ActionZone... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/InteractiveInput.ts | engine/src/transformation/InteractiveInput.ts | export type SelectOptionRequest = {
title: string;
options: Array<{
label: string;
description?: string | undefined;
}>;
selectedOption?: string | undefined;
};
export interface InteractiveInput {
selectOption(request: SelectOptionRequest): Promise<string | undefined>;
}
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/needsParentheses.ts | engine/src/transformation/needsParentheses.ts | import ts from "typescript";
import * as BinaryExpression from "../ast/BinaryExpression";
import { BinaryOperator } from "../ast/BinaryOperator";
import { NodeInformation } from "./AbstractTransformedNodeTree";
const injectionPatterns = [
{
nodeKind: ts.SyntaxKind.ArrowFunction,
parentKind: ts.SyntaxKind.Cal... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/getRemovalNode.test.ts | engine/src/transformation/getRemovalNode.test.ts | import ts from "typescript";
import { getId } from "../ast/getId";
import { createParseAndAugmentFunction } from "../augmentation/createParseAndAugmentFunction";
import { getRemovalNode } from "./getRemovalNode";
const parse = createParseAndAugmentFunction();
function testNodeRemoval(
node: ts.Node,
expectedRepla... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/Replacement.ts | engine/src/transformation/Replacement.ts | import ts from "typescript";
export type Replacement = {
originalNode: ts.Node;
replacementNode: ts.Node | null;
};
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/BinaryExpressionInverter.ts | engine/src/transformation/BinaryExpressionInverter.ts | import ts from "typescript";
import { TransformedNodeTree } from "..";
export type BinaryExpressionInversion = {
invertedOperator: ts.BinaryOperator;
invertedArguments: boolean;
isSafeForNullishAndNaN: boolean;
};
const inversions = new Map<ts.BinaryOperator, BinaryExpressionInversion>();
inversions.set(ts.Syn... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/Transformer.ts | engine/src/transformation/Transformer.ts | import { AnyMatch } from "../matcher/engine/Match";
import { Safety } from "./safety/Safety";
import { TransformedNodeTree } from "./TransformedNodeTree.generated";
export abstract class Transformer<PATTERN extends AnyMatch, RESULT> {
/**
* Transforms the tree with the information provided by the match. When this... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/PrefixToSuffixTriviaMove.ts | engine/src/transformation/trivia/PrefixToSuffixTriviaMove.ts | import ts from "typescript";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class PrefixToSuffixTriviaMove implements TriviaUpdate {
constructor(private readonly from: ts.Node, private readonly to: ts.Node) {}
addOverlays(triviaManager: TriviaManager) {
... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/TrailingSeparatorTriviaMove.ts | engine/src/transformation/trivia/TrailingSeparatorTriviaMove.ts | import ts from "typescript";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class TrailingSeparatorTriviaMove implements TriviaUpdate {
constructor(
private readonly from: ts.Node,
private readonly to: ts.Node,
private readonly newFromValue = false
... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/TrailingSeparatorTriviaEdit.ts | engine/src/transformation/trivia/TrailingSeparatorTriviaEdit.ts | import ts from "typescript";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class TrailingSeparatorTriviaEdit implements TriviaUpdate {
constructor(
private readonly from: ts.Node,
private readonly hasTrailingSeparator: boolean
) {}
addOverlays(tri... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/PrefixTriviaMove.ts | engine/src/transformation/trivia/PrefixTriviaMove.ts | import ts from "typescript";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class PrefixTriviaMove implements TriviaUpdate {
constructor(private readonly from: ts.Node, private readonly to: ts.Node) {}
addOverlays(triviaManager: TriviaManager) {
const fr... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/SwapPositionSuffixTriviaMove.ts | engine/src/transformation/trivia/SwapPositionSuffixTriviaMove.ts | import ts from "typescript";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class SwapPositionSuffixTriviaMove implements TriviaUpdate {
constructor(private readonly from: ts.Node, private readonly to: ts.Node) {}
addOverlays(triviaManager: TriviaManager) {
... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/TriviaManager.ts | engine/src/transformation/trivia/TriviaManager.ts | import ts from "typescript";
import { getId } from "../../ast/getId";
export type NodeTrivia = {
prefix: string | undefined;
/**
* Range of the direct suffix. This will not include suffixes that can
* be associated with the last child.
*/
suffix: string | undefined;
/**
* Range of the suffix, inc... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/SuffixTriviaMove.ts | engine/src/transformation/trivia/SuffixTriviaMove.ts | import ts from "typescript";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class SuffixTriviaMove implements TriviaUpdate {
constructor(private readonly from: ts.Node, private readonly to: ts.Node) {}
addOverlays(triviaManager: TriviaManager) {
const fr... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/TriviaUpdate.ts | engine/src/transformation/trivia/TriviaUpdate.ts | import { TriviaManager } from "./TriviaManager";
export interface TriviaUpdate {
addOverlays(triviaManager: TriviaManager): void;
}
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/PrefixWhitespaceTriviaMove.ts | engine/src/transformation/trivia/PrefixWhitespaceTriviaMove.ts | import ts from "typescript";
import { separateWhitespacePrefix } from "../../util/text/separateWhitespacePrefix";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class PrefixWhitespaceTriviaMove implements TriviaUpdate {
constructor(private readonly from: ts.Nod... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/SwapPositionTriviaMove.ts | engine/src/transformation/trivia/SwapPositionTriviaMove.ts | import ts from "typescript";
import { separateWhitespacePrefix } from "../../util/text/separateWhitespacePrefix";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class SwapPositionTriviaMove implements TriviaUpdate {
constructor(private readonly from: ts.Node, p... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/SwapPositionPrefixTriviaMove.ts | engine/src/transformation/trivia/SwapPositionPrefixTriviaMove.ts | import ts from "typescript";
import { separateWhitespacePrefix } from "../../util/text/separateWhitespacePrefix";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class SwapPositionPrefixTriviaMove implements TriviaUpdate {
constructor(private readonly from: ts.N... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/trivia/PrefixTriviaEdit.ts | engine/src/transformation/trivia/PrefixTriviaEdit.ts | import ts from "typescript";
import { separateWhitespacePrefix } from "../../util/text/separateWhitespacePrefix";
import { TriviaManager } from "./TriviaManager";
import { TriviaUpdate } from "./TriviaUpdate";
export class PrefixTriviaEdit implements TriviaUpdate {
constructor(
private readonly from: ts.Node,
... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/editor-operation/SelectOperation.ts | engine/src/transformation/editor-operation/SelectOperation.ts | import * as ts from "typescript";
import { Context } from "../../matcher/engine/Context";
import { Range } from "../../util/text/Range";
import { TransformedNodeTree } from "../TransformedNodeTree.generated";
import { RelativeRange } from "./RelativeRange";
export type SelectOperation = {
type: "SELECT";
selection... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/editor-operation/RenameOperation.ts | engine/src/transformation/editor-operation/RenameOperation.ts | import * as ts from "typescript";
import { NodePath } from "../../ast/NodePath";
import { TransformedNodeTree } from "../TransformedNodeTree.generated";
export type RenameOperation = {
type: "RENAME";
nodePath: NodePath;
};
export const rename = (nodePath: NodePath): RenameOperation => ({
type: "RENAME",
node... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/editor-operation/HighlightOperation.ts | engine/src/transformation/editor-operation/HighlightOperation.ts | import _ from "lodash";
import ts from "typescript";
import { NodePath } from "../../ast/NodePath";
import { isNotNull } from "../../util/collection/isNotNull";
import { Range } from "../../util/text/Range";
import { TransformedNodeTree } from "../TransformedNodeTree.generated";
type NodePathRange =
| [NodePath]
|... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/editor-operation/InsertSnippetOperation.ts | engine/src/transformation/editor-operation/InsertSnippetOperation.ts | import * as ts from "typescript";
import { NodePath } from "../../ast/NodePath";
import { TransformedNodeTree } from "../TransformedNodeTree.generated";
// TODO support different insertion positions (before/after/etc.)
export type InsertSnippetOperation = {
type: "INSERT_SNIPPET";
nodePath: NodePath;
snippet: st... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/editor-operation/index.ts | engine/src/transformation/editor-operation/index.ts | import { HighlightOperation } from "./HighlightOperation";
import { SelectOperation } from "./SelectOperation";
import { RenameOperation } from "./RenameOperation";
import { InsertSnippetOperation } from "./InsertSnippetOperation";
export type EditorOperation =
| HighlightOperation
| InsertSnippetOperation
| Sel... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/editor-operation/RelativeRange.ts | engine/src/transformation/editor-operation/RelativeRange.ts | import { NodePath } from "../../ast/NodePath";
import { Range } from "../../util/text/Range";
export type RelativeRange = {
/**
* Path to resolve the node.
*/
nodePath: NodePath;
/**
* Range offset relative to `node.getStart()` of the resolved node.
*/
offset?: Range | undefined;
};
| typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/StringLiteralElement.ts | engine/src/transformation/reprinter/StringLiteralElement.ts | import ts from "typescript";
import { isSingleQuote } from "../../ast/isSingleQuote";
import { escapeChar } from "../../util/text/escapeChar";
import { ChildIterationContext } from "./ChildIterationContext";
import { Element } from "./Element";
import { ExtractionContext } from "./ExtractionContext";
import { ReprintCo... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ReprintTemplateBuilder.ts | engine/src/transformation/reprinter/ReprintTemplateBuilder.ts | import ts from "typescript";
import { ChangeIndentationElement } from "./ChangeIndentationElement";
import { ChildNodeListElement } from "./ChildNodeListElement";
import { ChildNodeElement } from "./ChildNodeElement";
import { ChildTokenElement } from "./ChildTokenElement";
import { ChildValueElement } from "./ChildVal... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/getNodeEndIncludingTrailingComments.ts | engine/src/transformation/reprinter/getNodeEndIncludingTrailingComments.ts | import ts from "typescript";
export function getNodeEndIncludingTrailingComments(
node: ts.Node,
sourceText: string
): number {
const nodeEnd = node.end;
const trailingCommentRanges = ts.getTrailingCommentRanges(
sourceText,
nodeEnd
);
if (trailingCommentRanges == null) {
return nodeEnd;
}
... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ChangeIndentationElement.ts | engine/src/transformation/reprinter/ChangeIndentationElement.ts | import ts from "typescript";
import { ChildIterationContext } from "./ChildIterationContext";
import { Element } from "./Element";
import { ExtractionContext } from "./ExtractionContext";
import { ReprintContext } from "./ReprintContext";
import { TriviaGatheringContext } from "./TriviaGatheringContext";
export class ... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ReprinterTestUtils.ts | engine/src/transformation/reprinter/ReprinterTestUtils.ts | import { TransformedNodeTree } from "../TransformedNodeTree.generated";
import { createParseAndAugmentFunction } from "../../augmentation/createParseAndAugmentFunction";
export const expectReprint = (tree: TransformedNodeTree, content: string) => {
const edit = tree.toEdit();
return expect(edit?.applyTo(content) ?... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ReprintBlueprints.ts | engine/src/transformation/reprinter/ReprintBlueprints.ts | import ts from "typescript";
import { getModuleDeclarationKeyword } from "../../ast/getModuleDeclarationKeyword";
import { getVariableDeclarationKindKeyword } from "../../ast/VariableDeclarationKind";
import { Conditions } from "./Condition";
import { PrintSettings } from "./PrintSettings";
import { ReprintTemplate } f... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ExtractionContext.ts | engine/src/transformation/reprinter/ExtractionContext.ts | import ts from "typescript";
import { TransformedNodeTree } from "../TransformedNodeTree.generated";
export class ExtractionContext {
/**
* Children excluding JSDoc comments (which are handled like other comments).
*/
children: Array<ts.Node>;
text: string;
original: ts.Node;
nextChildIndex = 0;
c... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/TokenElement.ts | engine/src/transformation/reprinter/TokenElement.ts | import ts from "typescript";
import { Element } from "./Element";
import { ChildIterationContext } from "./ChildIterationContext";
import { ExtractionContext } from "./ExtractionContext";
import { ReprintContext } from "./ReprintContext";
import { TriviaGatheringContext } from "./TriviaGatheringContext";
export class ... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/Reprinter.ts | engine/src/transformation/reprinter/Reprinter.ts | import ts from "typescript";
import { getId } from "../../ast/getId";
import { getSyntaxKindLabel } from "../../ast/getSyntaxKindLabel";
import { KEYWORDS } from "../../ast/Keywords";
import { TOKENS } from "../../ast/Tokens";
import { Range } from "../../util/text/Range";
import { TransformedNodeTree } from "../Transf... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/PrintSettings.ts | engine/src/transformation/reprinter/PrintSettings.ts | import { NewlineSeparator, StandardSeparator } from "./Separator";
export class PrintSettings {
/**
* Line break characters.
*/
readonly lineBreak: "\r\n" | "\n";
/**
* Characters for a single indentation level, e.g. one tab or 4 spaces.
*/
readonly singleIndentation: string;
/**
* Quote set... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ReprintTemplate.ts | engine/src/transformation/reprinter/ReprintTemplate.ts | import ts from "typescript";
import { ChildIterationContext } from "./ChildIterationContext";
import { Element } from "./Element";
import { ExtractionContext } from "./ExtractionContext";
import { ReprintContext } from "./ReprintContext";
import { TriviaGatheringContext } from "./TriviaGatheringContext";
export class ... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/gatherTrivia.ts | engine/src/transformation/reprinter/gatherTrivia.ts | import ts from "typescript";
import { TransformedNodeTree } from "../TransformedNodeTree.generated";
import { getBaseIndentation } from "./format_inference/getBaseIndentation";
import { getNodeEndIncludingTrailingComments } from "./getNodeEndIncludingTrailingComments";
import { PrintSettings } from "./PrintSettings";
i... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/Reprinter.test.ts | engine/src/transformation/reprinter/Reprinter.test.ts | import ts from "typescript";
import { factory } from "../..";
import { createParseAndAugmentFunction } from "../../augmentation/createParseAndAugmentFunction";
import { Flags } from "../../util/Flags";
import { TransformedNodeTree } from "../TransformedNodeTree.generated";
import { PrefixToSuffixTriviaMove } from "../t... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | true |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/Edit.ts | engine/src/transformation/reprinter/Edit.ts | import { Range } from "../../util/text/Range";
export class Edit {
constructor(readonly range: Range, readonly replacement: string) {}
applyTo(text: string, offset = 0) {
return (
text.substring(0, this.range.start + offset) +
this.replacement +
text.substring(this.range.end + offset)
);... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/WhitespaceElement.ts | engine/src/transformation/reprinter/WhitespaceElement.ts | import ts from "typescript";
import { ChildIterationContext } from "./ChildIterationContext";
import { Element } from "./Element";
import { ExtractionContext } from "./ExtractionContext";
import { ReprintContext } from "./ReprintContext";
import { TriviaGatheringContext } from "./TriviaGatheringContext";
export type W... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/NewlineElement.ts | engine/src/transformation/reprinter/NewlineElement.ts | import ts from "typescript";
import { ChildIterationContext } from "./ChildIterationContext";
import { Element } from "./Element";
import { ExtractionContext } from "./ExtractionContext";
import { ReprintContext } from "./ReprintContext";
import { NewlineSeparator } from "./Separator";
import { TriviaGatheringContext }... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/Element.ts | engine/src/transformation/reprinter/Element.ts | import ts from "typescript";
import { ChildIterationContext } from "./ChildIterationContext";
import { ExtractionContext } from "./ExtractionContext";
import { ReprintContext } from "./ReprintContext";
import { TriviaGatheringContext } from "./TriviaGatheringContext";
export interface Element {
emit(node: ts.Node, c... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ReprintContext.ts | engine/src/transformation/reprinter/ReprintContext.ts | import ts from "typescript";
import { NodeTransformationState } from "../NodeTransformationState";
import { TransformedNodeTree } from "../TransformedNodeTree.generated";
import { NodeTrivia, TriviaManager } from "../trivia/TriviaManager";
import { Indenter } from "./indenter/Indenter";
import { Reprinter } from "./Rep... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ChildNodeListElement.ts | engine/src/transformation/reprinter/ChildNodeListElement.ts | import ts from "typescript";
import { ChildIterationContext } from "./ChildIterationContext";
import { Element } from "./Element";
import { ExtractionContext } from "./ExtractionContext";
import { findSeparatorIndexOutsideOfComment } from "./findSeparatorIndexOutsideOfComment";
import { getNodeEndIncludingTrailingComme... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ChildIterationContext.ts | engine/src/transformation/reprinter/ChildIterationContext.ts | import ts from "typescript";
import { TransformedNodeTree } from "../TransformedNodeTree.generated";
export class ChildIterationContext {
readonly children: Array<ts.Node>;
childIndex: number;
constructor(readonly parent: ts.Node, readonly tree: TransformedNodeTree) {
this.children = parent
.getChildr... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/findSeparatorIndexOutsideOfComment.test.ts | engine/src/transformation/reprinter/findSeparatorIndexOutsideOfComment.test.ts | import { findSeparatorIndexOutsideOfComment } from "./findSeparatorIndexOutsideOfComment";
describe("findSeparatorIndexOutsideOfComment", () => {
describe("comma separator", () => {
it("should return the index of a comma in a text without comments", () => {
expect(findSeparatorIndexOutsideOfComment("a, b",... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/minimizeEdit.ts | engine/src/transformation/reprinter/minimizeEdit.ts | import { Range } from "../../util/text/Range";
import { Edit } from "./Edit";
/**
* Removes prefix/suffix text from the edit if it does not change the original.
* When the edit is fully redundant, `undefined` is returned.
*/
export const minimizeEdit = (
edit: Edit,
originalText: string
): Edit | undefined => {... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
lgrammel/js-assistant | https://github.com/lgrammel/js-assistant/blob/01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6/engine/src/transformation/reprinter/ConditionalElement.ts | engine/src/transformation/reprinter/ConditionalElement.ts | import ts from "typescript";
import { Condition } from "./Condition";
import { Element } from "./Element";
import { ChildIterationContext } from "./ChildIterationContext";
import { ExtractionContext } from "./ExtractionContext";
import { ReprintContext } from "./ReprintContext";
import { TriviaGatheringContext } from "... | typescript | MIT | 01d9bce026eeea02efb17f2ce50a1fadb4fd6ba6 | 2026-01-05T04:58:33.174500Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.