Skip to content

Commit f6e66b6

Browse files
authored
🤖 Merge PR DefinitelyTyped#73378 [@babel/traverse] Sync types of asserts and validators by @danez
1 parent 1c76e12 commit f6e66b6

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

‎types/babel__traverse/index.d.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ export class NodePath<T = Node> {
877877
isFunction(opts?: object): this is NodePath<t.Function>;
878878
isFunctionDeclaration(opts?: object): this is NodePath<t.FunctionDeclaration>;
879879
isFunctionExpression(opts?: object): this is NodePath<t.FunctionExpression>;
880+
isFunctionParameter(opts?: object): this is NodePath<t.FunctionParameter>;
880881
isFunctionParent(opts?: object): this is NodePath<t.FunctionParent>;
881882
isFunctionTypeAnnotation(opts?: object): this is NodePath<t.FunctionTypeAnnotation>;
882883
isFunctionTypeParam(opts?: object): this is NodePath<t.FunctionTypeParam>;
@@ -887,8 +888,10 @@ export class NodePath<T = Node> {
887888
isImport(opts?: object): this is NodePath<t.Import>;
888889
isImportAttribute(opts?: object): this is NodePath<t.ImportAttribute>;
889890
isImportDeclaration(opts?: object): this is NodePath<t.ImportDeclaration>;
891+
isImportExpression(opts?: object): this is NodePath<t.ImportExpression>;
890892
isImportDefaultSpecifier(opts?: object): this is NodePath<t.ImportDefaultSpecifier>;
891893
isImportNamespaceSpecifier(opts?: object): this is NodePath<t.ImportNamespaceSpecifier>;
894+
isImportOrExportDeclaration(opts?: object): this is NodePath<t.ImportOrExportDeclaration>;
892895
isImportSpecifier(opts?: object): this is NodePath<t.ImportSpecifier>;
893896
isIndexedAccessType(opts?: object): this is NodePath<t.IndexedAccessType>;
894897
isInferredPredicate(opts?: object): this is NodePath<t.InferredPredicate>;
@@ -1004,6 +1007,7 @@ export class NodePath<T = Node> {
10041007
isTSDeclareFunction(opts?: object): this is NodePath<t.TSDeclareFunction>;
10051008
isTSDeclareMethod(opts?: object): this is NodePath<t.TSDeclareMethod>;
10061009
isTSEntityName(opts?: object): this is NodePath<t.TSEntityName>;
1010+
isTSEnumBody(opts?: object): this is NodePath<t.TSEnumBody>;
10071011
isTSEnumDeclaration(opts?: object): this is NodePath<t.TSEnumDeclaration>;
10081012
isTSEnumMember(opts?: object): this is NodePath<t.TSEnumMember>;
10091013
isTSExportAssignment(opts?: object): this is NodePath<t.TSExportAssignment>;
@@ -1041,6 +1045,7 @@ export class NodePath<T = Node> {
10411045
isTSSatisfiesExpression(opts?: object): this is NodePath<t.TSSatisfiesExpression>;
10421046
isTSStringKeyword(opts?: object): this is NodePath<t.TSStringKeyword>;
10431047
isTSSymbolKeyword(opts?: object): this is NodePath<t.TSSymbolKeyword>;
1048+
isTSTemplateLiteralType(opts?: object): this is NodePath<t.TSTemplateLiteralType>;
10441049
isTSThisType(opts?: object): this is NodePath<t.TSThisType>;
10451050
isTSTupleType(opts?: object): this is NodePath<t.TSTupleType>;
10461051
isTSType(opts?: object): this is NodePath<t.TSType>;
@@ -1088,6 +1093,7 @@ export class NodePath<T = Node> {
10881093
isVariableDeclaration(opts?: object): this is NodePath<t.VariableDeclaration>;
10891094
isVariableDeclarator(opts?: object): this is NodePath<t.VariableDeclarator>;
10901095
isVariance(opts?: object): this is NodePath<t.Variance>;
1096+
isVoidPattern(opts?: object): this is NodePath<t.VoidPattern>;
10911097
isVoidTypeAnnotation(opts?: object): this is NodePath<t.VoidTypeAnnotation>;
10921098
isWhile(opts?: object): this is NodePath<t.While>;
10931099
isWhileStatement(opts?: object): this is NodePath<t.WhileStatement>;
@@ -1208,6 +1214,7 @@ export class NodePath<T = Node> {
12081214
assertFunction(opts?: object): asserts this is NodePath<t.Function>;
12091215
assertFunctionDeclaration(opts?: object): asserts this is NodePath<t.FunctionDeclaration>;
12101216
assertFunctionExpression(opts?: object): asserts this is NodePath<t.FunctionExpression>;
1217+
assertFunctionParameter(opts?: object): asserts this is NodePath<t.FunctionParameter>;
12111218
assertFunctionParent(opts?: object): asserts this is NodePath<t.FunctionParent>;
12121219
assertFunctionTypeAnnotation(opts?: object): asserts this is NodePath<t.FunctionTypeAnnotation>;
12131220
assertFunctionTypeParam(opts?: object): asserts this is NodePath<t.FunctionTypeParam>;
@@ -1218,8 +1225,10 @@ export class NodePath<T = Node> {
12181225
assertImport(opts?: object): asserts this is NodePath<t.Import>;
12191226
assertImportAttribute(opts?: object): asserts this is NodePath<t.ImportAttribute>;
12201227
assertImportDeclaration(opts?: object): asserts this is NodePath<t.ImportDeclaration>;
1228+
assertImportExpression(opts?: object): asserts this is NodePath<t.ImportExpression>;
12211229
assertImportDefaultSpecifier(opts?: object): asserts this is NodePath<t.ImportDefaultSpecifier>;
12221230
assertImportNamespaceSpecifier(opts?: object): asserts this is NodePath<t.ImportNamespaceSpecifier>;
1231+
assertImportOrExportDeclaration(opts?: object): asserts this is NodePath<t.ImportOrExportDeclaration>;
12231232
assertImportSpecifier(opts?: object): asserts this is NodePath<t.ImportSpecifier>;
12241233
assertIndexedAccessType(opts?: object): asserts this is NodePath<t.IndexedAccessType>;
12251234
assertInferredPredicate(opts?: object): asserts this is NodePath<t.InferredPredicate>;
@@ -1335,6 +1344,7 @@ export class NodePath<T = Node> {
13351344
assertTSDeclareFunction(opts?: object): asserts this is NodePath<t.TSDeclareFunction>;
13361345
assertTSDeclareMethod(opts?: object): asserts this is NodePath<t.TSDeclareMethod>;
13371346
assertTSEntityName(opts?: object): asserts this is NodePath<t.TSEntityName>;
1347+
assertTSEnumBody(opts?: object): asserts this is NodePath<t.TSEnumBody>;
13381348
assertTSEnumDeclaration(opts?: object): asserts this is NodePath<t.TSEnumDeclaration>;
13391349
assertTSEnumMember(opts?: object): asserts this is NodePath<t.TSEnumMember>;
13401350
assertTSExportAssignment(opts?: object): asserts this is NodePath<t.TSExportAssignment>;
@@ -1372,6 +1382,7 @@ export class NodePath<T = Node> {
13721382
assertTSSatisfiesExpression(opts?: object): asserts this is NodePath<t.TSSatisfiesExpression>;
13731383
assertTSStringKeyword(opts?: object): asserts this is NodePath<t.TSStringKeyword>;
13741384
assertTSSymbolKeyword(opts?: object): asserts this is NodePath<t.TSSymbolKeyword>;
1385+
assertTSTemplateLiteralType(opts?: object): asserts this is NodePath<t.TSTemplateLiteralType>;
13751386
assertTSThisType(opts?: object): asserts this is NodePath<t.TSThisType>;
13761387
assertTSTupleType(opts?: object): asserts this is NodePath<t.TSTupleType>;
13771388
assertTSType(opts?: object): asserts this is NodePath<t.TSType>;
@@ -1419,6 +1430,7 @@ export class NodePath<T = Node> {
14191430
assertVariableDeclaration(opts?: object): asserts this is NodePath<t.VariableDeclaration>;
14201431
assertVariableDeclarator(opts?: object): asserts this is NodePath<t.VariableDeclarator>;
14211432
assertVariance(opts?: object): asserts this is NodePath<t.Variance>;
1433+
assertVoidPattern(opts?: object): asserts this is NodePath<t.VoidPattern>;
14221434
assertVoidTypeAnnotation(opts?: object): asserts this is NodePath<t.VoidTypeAnnotation>;
14231435
assertWhile(opts?: object): asserts this is NodePath<t.While>;
14241436
assertWhileStatement(opts?: object): asserts this is NodePath<t.WhileStatement>;

‎types/babel__traverse/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"private": true,
33
"name": "@types/babel__traverse",
4-
"version": "7.20.9999",
4+
"version": "7.28.9999",
55
"projects": [
66
"https://github.com/babel/babel/tree/main/packages/babel-traverse",
77
"https://babeljs.io"
88
],
99
"dependencies": {
10-
"@babel/types": "^7.20.7"
10+
"@babel/types": "^7.28.2"
1111
},
1212
"devDependencies": {
1313
"@types/babel__traverse": "workspace:."

0 commit comments

Comments
 (0)