-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Open
Description
⚙ Compilation target
es2024
⚙ Library
es2020.promise
Missing / Incorrect Definition
I'm getting this from es2020 lib:
interface PromiseRejectedResult {
status: "rejected";
reason: any;
}while unknown would be better fit
interface PromiseRejectedResult {
status: "rejected";
reason: unknown;
}
Sample Code
when I'm working with reason from rejected eslint `@typescript-eslint/no-unsafe-assignment` correctly flags that I'm working with `any`
if (result.status === 'fulfilled') {
return result.value;
}
// this is flagged by eslint
const { reason } = result;Documentation Link
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels