⚙ 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
⚙ Compilation target
es2024
⚙ Library
es2020.promise
Missing / Incorrect Definition
I'm getting this from es2020 lib:
while unknown would be better fit
Sample Code
Documentation Link
No response