Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

When can body be undefined or null in vanilla espree? #734

Closed
Labels
enhancementNew feature or requestpackage: parserIssues related to @typescript-eslint/parserpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree
@G-Rath

Description

@G-Rath

I'm working on convertingeslint-plugin-jest to typescript, and have come across a type definition that I can't reproduce at runtime.

While convertingno-test-callbacks, I found out that it's apparently possible for thebody of aFunctionDeclaration to benull.

This has required me toadd a null check in order to please typescript.

This in turn upsets our coverage b/c that branch is never tested, leading me here as I've not been able to write any code that reproduces the defined type.

Hence: how can I have aFunctionDeclaration w/ abody ofnull at runtime?

I suspect this heavily relates to#420, but theres too many moving parts for me to properly track :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpackage: parserIssues related to @typescript-eslint/parserpackage: 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


      [8]ページ先頭

      ©2009-2025 Movatter.jp