Skip to content

Commit

Permalink
fix: missing code generation for v21 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Dec 2, 2023
1 parent fe18369 commit 9ab9eed
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 104 deletions.
10 changes: 6 additions & 4 deletions deno/ts_morph.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3184,6 +3184,8 @@ export declare class Node<NodeType extends ts.Node = ts.Node> {
static readonly isIdentifier: (node: Node | undefined) => node is Identifier;
/** Gets if the node is a IfStatement. */
static readonly isIfStatement: (node: Node | undefined) => node is IfStatement;
/** Gets if the node is a ImportAttribute. */
static readonly isImportAttribute: (node: Node | undefined) => node is ImportAttribute;
/** Gets if the node is a ImportAttributes. */
static readonly isImportAttributes: (node: Node | undefined) => node is ImportAttributes;
/** Gets if the node is a ImportClause. */
Expand Down Expand Up @@ -4119,8 +4121,8 @@ export declare class Node<NodeType extends ts.Node = ts.Node> {
static isHeritageClauseable<T extends Node>(node: T | undefined): node is HeritageClauseableNode & HeritageClauseableNodeExtensionType & T;
/** Gets if the node is a ImplementsClauseableNode. */
static isImplementsClauseable<T extends Node>(node: T | undefined): node is ImplementsClauseableNode & ImplementsClauseableNodeExtensionType & T;
/** Gets if the node is a ImportAttribute. */
static isImportAttribute(node: Node | undefined): node is ImportAttribute;
/** Gets if the node is a ImportAttributeNamedNode. */
static isImportAttributeNamed<T extends Node>(node: T | undefined): node is ImportAttributeNamedNode & ImportAttributeNamedNodeExtensionType & T;
/** Gets if the node is a ImportExpression. */
static isImportExpression(node: Node | undefined): node is ImportExpression;
/** Gets if the node is a ImportTypeNode. */
Expand Down Expand Up @@ -10733,8 +10735,8 @@ export declare const Structure: {
readonly isStaticable: <T_21>(structure: T_21) => structure is T_21 & StaticableNodeStructure;
/** Gets if the provided structure is a ImportAttributeStructure. */
readonly isImportAttribute: (structure: unknown) => structure is ImportAttributeStructure;
/** Gets if the provided structure is a ImportAttributeKeyNamedNodeStructure. */
readonly isImportAttributeKeyNamed: <T_22>(structure: T_22) => structure is T_22 & ImportAttributeNamedNodeStructure;
/** Gets if the provided structure is a ImportAttributeNamedNodeStructure. */
readonly isImportAttributeNamed: <T_22>(structure: T_22) => structure is T_22 & ImportAttributeNamedNodeStructure;
/** Gets if the provided structure is a ImportDeclarationStructure. */
readonly isImportDeclaration: (structure: unknown) => structure is ImportDeclarationStructure;
/** Gets if the provided structure is a ImportSpecifierStructure. */
Expand Down
11 changes: 8 additions & 3 deletions deno/ts_morph.js
Original file line number Diff line number Diff line change
Expand Up @@ -4547,7 +4547,8 @@ class Node {
return false;
}
}
static isImportAttribute(node) {
static isImportAttribute = Node.is(SyntaxKind.ImportAttribute);
static isImportAttributeNamed(node) {
return node?.getKind() === SyntaxKind.ImportAttribute;
}
static isImportAttributes = Node.is(SyntaxKind.ImportAttributes);
Expand Down Expand Up @@ -5176,6 +5177,7 @@ class Node {
case SyntaxKind.FunctionExpression:
case SyntaxKind.GetAccessor:
case SyntaxKind.Identifier:
case SyntaxKind.ImportAttribute:
case SyntaxKind.ImportEqualsDeclaration:
case SyntaxKind.InterfaceDeclaration:
case SyntaxKind.MetaProperty:
Expand Down Expand Up @@ -5211,6 +5213,7 @@ class Node {
case SyntaxKind.FunctionExpression:
case SyntaxKind.GetAccessor:
case SyntaxKind.Identifier:
case SyntaxKind.ImportAttribute:
case SyntaxKind.ImportEqualsDeclaration:
case SyntaxKind.InterfaceDeclaration:
case SyntaxKind.MetaProperty:
Expand Down Expand Up @@ -6965,7 +6968,7 @@ const Structure = {
isImportAttribute(structure) {
return structure?.kind === StructureKind.ImportAttribute;
},
isImportAttributeKeyNamed(structure) {
isImportAttributeNamed(structure) {
return structure?.kind === StructureKind.ImportAttribute;
},
isImportDeclaration(structure) {
Expand Down Expand Up @@ -7310,9 +7313,11 @@ function forInterfaceDeclaration(structure, callback) {
function forTypeElementMemberedNode(structure, callback) {
return forAll(structure.callSignatures, callback, StructureKind.CallSignature)
|| forAll(structure.constructSignatures, callback, StructureKind.ConstructSignature)
|| forAll(structure.getAccessors, callback, StructureKind.GetAccessor)
|| forAll(structure.indexSignatures, callback, StructureKind.IndexSignature)
|| forAll(structure.methods, callback, StructureKind.MethodSignature)
|| forAll(structure.properties, callback, StructureKind.PropertySignature);
|| forAll(structure.properties, callback, StructureKind.PropertySignature)
|| forAll(structure.setAccessors, callback, StructureKind.SetAccessor);
}
function forJSDoc(structure, callback) {
return forAll(structure.tags, callback, StructureKind.JSDocTag);
Expand Down
1 change: 0 additions & 1 deletion dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"packages/*/dist/",
"packages/*/lib/*.ts",
"**/CHANGELOG.md",
"**/wrapped-nodes.md",
"packages/ts-morph/src/compiler/ast/common/Node.ts",
"./deno",
"dist-deno"
Expand Down
140 changes: 70 additions & 70 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"packages/ts-morph"
],
"devDependencies": {
"dprint": "^0.43.1"
"dprint": "^0.43.2"
}
}
4 changes: 2 additions & 2 deletions packages/scripts/deps.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * as path from "https://deno.land/std@0.191.0/path/mod.ts";
export * as tsMorph from "https://deno.land/x/ts_morph@20.0.0/mod.ts";
export * as path from "https://deno.land/std@0.208.0/path/mod.ts";
export * as tsMorph from "https://deno.land/x/ts_morph@21.0.0/mod.ts";

0 comments on commit 9ab9eed

Please sign in to comment.