@typescript-eslint/types 8.61.1-alpha.0 → 8.61.1-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,8 @@ export declare interface ArrayPattern extends BaseNode {
30
30
  optional: boolean;
31
31
  typeAnnotation: TSTypeAnnotation | undefined;
32
32
  }
33
- export declare interface ArrowFunctionExpression extends BaseNode {
33
+ export declare type ArrowFunctionExpression = ArrowFunctionExpressionWithBlockBody | ArrowFunctionExpressionWithExpressionBody;
34
+ declare interface ArrowFunctionExpressionBase extends BaseNode {
34
35
  type: AST_NODE_TYPES.ArrowFunctionExpression;
35
36
  async: boolean;
36
37
  body: BlockStatement | Expression;
@@ -41,6 +42,14 @@ export declare interface ArrowFunctionExpression extends BaseNode {
41
42
  returnType: TSTypeAnnotation | undefined;
42
43
  typeParameters: TSTypeParameterDeclaration | undefined;
43
44
  }
45
+ export declare interface ArrowFunctionExpressionWithBlockBody extends ArrowFunctionExpressionBase {
46
+ body: BlockStatement;
47
+ expression: false;
48
+ }
49
+ export declare interface ArrowFunctionExpressionWithExpressionBody extends ArrowFunctionExpressionBase {
50
+ body: Expression;
51
+ expression: true;
52
+ }
44
53
  export declare interface AssignmentExpression extends BaseNode {
45
54
  type: AST_NODE_TYPES.AssignmentExpression;
46
55
  left: Expression;
@@ -2004,12 +2013,20 @@ export declare interface TSTypeParameterInstantiation extends BaseNode {
2004
2013
  type: AST_NODE_TYPES.TSTypeParameterInstantiation;
2005
2014
  params: TypeNode[];
2006
2015
  }
2007
- export declare interface TSTypePredicate extends BaseNode {
2016
+ export declare type TSTypePredicate = TSTypePredicateNoAsserts | TSTypePredicateWithAsserts;
2017
+ declare interface TSTypePredicateBase extends BaseNode {
2008
2018
  type: AST_NODE_TYPES.TSTypePredicate;
2009
2019
  asserts: boolean;
2010
2020
  parameterName: Identifier | TSThisType;
2011
2021
  typeAnnotation: TSTypeAnnotation | null;
2012
2022
  }
2023
+ export declare interface TSTypePredicateNoAsserts extends TSTypePredicateBase {
2024
+ asserts: false;
2025
+ typeAnnotation: TSTypeAnnotation;
2026
+ }
2027
+ export declare interface TSTypePredicateWithAsserts extends TSTypePredicateBase {
2028
+ asserts: true;
2029
+ }
2013
2030
  export declare interface TSTypeQuery extends BaseNode {
2014
2031
  type: AST_NODE_TYPES.TSTypeQuery;
2015
2032
  exprName: EntityName | TSImportType;
@@ -2038,9 +2055,14 @@ export declare type TypeElement = TSCallSignatureDeclaration | TSConstructSignat
2038
2055
  export declare type TypeNode = TSAbstractKeyword | TSAnyKeyword | TSArrayType | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSConditionalType | TSConstructorType | TSDeclareKeyword | TSExportKeyword | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSNamedTupleMember | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSPrivateKeyword | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword;
2039
2056
  export declare type UnaryExpression = UnaryExpressionBitwiseNot | UnaryExpressionDelete | UnaryExpressionMinus | UnaryExpressionNot | UnaryExpressionPlus | UnaryExpressionTypeof | UnaryExpressionVoid;
2040
2057
  declare interface UnaryExpressionBase extends BaseNode {
2058
+ type: AST_NODE_TYPES.UnaryExpression;
2041
2059
  argument: Expression;
2042
2060
  operator: string;
2043
- prefix: boolean;
2061
+ /**
2062
+ * @deprecated The `prefix` property is always `true` and is only present for historical reasons.
2063
+ * See https://github.com/estree/estree/pull/118.
2064
+ */
2065
+ prefix: true;
2044
2066
  }
2045
2067
  export declare type UnaryExpressionBitwiseNot = UnaryExpressionSpecific<'~'>;
2046
2068
  export declare type UnaryExpressionDelete = UnaryExpressionSpecific<'delete'>;
@@ -2048,14 +2070,15 @@ export declare type UnaryExpressionMinus = UnaryExpressionSpecific<'-'>;
2048
2070
  export declare type UnaryExpressionNot = UnaryExpressionSpecific<'!'>;
2049
2071
  export declare type UnaryExpressionPlus = UnaryExpressionSpecific<'+'>;
2050
2072
  declare interface UnaryExpressionSpecific<T extends string> extends UnaryExpressionBase {
2051
- type: AST_NODE_TYPES.UnaryExpression;
2052
2073
  operator: T;
2053
2074
  }
2054
2075
  export declare type UnaryExpressionTypeof = UnaryExpressionSpecific<'typeof'>;
2055
2076
  export declare type UnaryExpressionVoid = UnaryExpressionSpecific<'void'>;
2056
- export declare interface UpdateExpression extends UnaryExpressionBase {
2077
+ export declare interface UpdateExpression extends BaseNode {
2057
2078
  type: AST_NODE_TYPES.UpdateExpression;
2079
+ argument: Expression;
2058
2080
  operator: '++' | '--';
2081
+ prefix: boolean;
2059
2082
  }
2060
2083
  export declare type UsingDeclaration = UsingInForOfDeclaration | UsingInNormalContextDeclaration;
2061
2084
  declare interface UsingDeclarationBase extends BaseNode {
@@ -2155,9 +2178,17 @@ export declare interface WithStatement extends BaseNode {
2155
2178
  body: Statement;
2156
2179
  object: Expression;
2157
2180
  }
2158
- export declare interface YieldExpression extends BaseNode {
2181
+ export declare type YieldExpression = YieldNoStarExpression | YieldStarExpression;
2182
+ declare interface YieldExpressionBase extends BaseNode {
2159
2183
  type: AST_NODE_TYPES.YieldExpression;
2160
2184
  argument: Expression | null;
2161
2185
  delegate: boolean;
2162
2186
  }
2187
+ export declare interface YieldNoStarExpression extends YieldExpressionBase {
2188
+ delegate: false;
2189
+ }
2190
+ export declare interface YieldStarExpression extends YieldExpressionBase {
2191
+ argument: Expression;
2192
+ delegate: true;
2193
+ }
2163
2194
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/types",
3
- "version": "8.61.1-alpha.0",
3
+ "version": "8.61.1-alpha.2",
4
4
  "description": "Types for the TypeScript-ESTree AST spec",
5
5
  "files": [
6
6
  "dist",