Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Relevant Package
ast-spec
Issue
According to the ECMAScript specification, ThrowStatement is required to have an expression as argument:
https://tc39.es/ecma262/#sec-throw-statement
But in ast-spec, the argument is exposed as a statement or null:
import type { AST_NODE_TYPES } from '../../ast-node-types';
import type { BaseNode } from '../../base/BaseNode';
import type { TSAsExpression } from '../../expression/TSAsExpression/spec';
import type { Statement } from '../../unions/Statement';
export interface ThrowStatement extends BaseNode {
type: AST_NODE_TYPES.ThrowStatement;
argument: Statement | TSAsExpression | null;
}
Versions
package | version |
---|---|
@typescript-eslint/types |
7.16.1 |