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.
Playground Link
Repro Code
export type PromiseWithResolvers<T> = {
// ...
}
/**
* Userland implementation of [Promise.withResolvers]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers}.
* Once we upgrade to Node 22, we can switch to the builtin.
*/
export function withResolvers<T>(): PromiseWithResolvers<T>
export function withResolvers<T>(
this: PromiseConstructor
): PromiseWithResolvers<T>
export function withResolvers<T>(
this: PromiseConstructor | undefined
): PromiseWithResolvers<T> {
return {
// ...
}
}
ESLint Config
module.exports = {
parser: "@typescript-eslint/parser",
rules: {
"@typescript-eslint/unified-signatures": "error",
},
};
tsconfig
Expected Result
It's not possible to merge these overloads, so I expected no error
Actual Result
These overloads can be combined into one signature with an optional parameter. 11:3 - 11:27
Additional Info
No response