镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Typescript v5.6.2 resulting in "Overload signatures must all be optional or required." on alpine linux arm64 #59982

Closed as not planned

Description

🔎 Search Terms

"Overload signature must all be optional", "error TS2386"

🕗 Version & Regression Information

  • This changed between versions 5.6.2 and earlier versions

⏯ Playground Link

💻 Code

// Your code here

🙁 Actual behavior

tsc threw an error when trying to compile node types

node_modules/@types/node/module.d.ts(107,13): error TS2386: Overload signatures must all be optional or required.

🙂 Expected behavior

tsc should have been able to compile correctly but threw an error

Additional information about the issue

This worked when downgrading typescript to 5.1.6

Activity

  1. typescript-bot commented on Sep 19, 2024

    @typescript-bot
    Contributor

    This issue has been marked as "External" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

  2. zyhou commented on Sep 19, 2024

    @zyhou

    Same issue here, the solution is to update @types/node dependency to a compatible version, ie ^18.19.50 for Nodejs 18, etc...

    related -> DefinitelyTyped/DefinitelyTyped#70562 and #59259 (comment)

  3. added a commit that references this issue on Oct 3, 2024
  4. added a commit that references this issue on Oct 5, 2024
  5. hisashiyamaguchi commented on May 15, 2025

    @hisashiyamaguchi

    I have the same issue. Any workarounds?

    $ npx tsc --version
    Version 5.8.3

  6. AngularIsAwfull commented on Jul 2, 2025

    @AngularIsAwfull

    Hisashi Yamaguchi (@hisashiyamaguchi) , updating @types/node to a compatible version of node <-> typescript fixed this issue for me. I hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions