Skip to content

incorrect type - TryStatement's finalizer property can't be null #2912

Closed
@RebeccaStevens

Description

@RebeccaStevens

Please don't ignore this template.

There doesn't seem to be a template for "@typescript-eslint/types".

Checks

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Problem

The finalizer property on the TryStatement node type can be null but the type says it can't be.

Expected Type

interface TryStatement extends BaseNode {
  // ...
  finalizer: BlockStatement | null;
}

Actual Type

interface TryStatement extends BaseNode {
  // ...
  finalizer: BlockStatement;
}

Versions

package version
@typescript-eslint/type 4.11.1
TypeScript 4.1.3
node 14.15.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas prthere is a PR raised to close thispackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions