-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
Implement #138 w/in ts-reset
When using code like
const isReady = Boolean(downloadURL);
return isReady ?
<LinkButton fullWidth href={downloadURL} download={fileName}>
Download
</LinkButton>
: null;downloadURL is considered falsey still in the ternary. With this change to global types:
interface BooleanConstructor {
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
new (value?: unknown): Boolean;
<T>(value?: T): value is TSReset.NonFalsy<T>;
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
readonly prototype: Boolean;
}It typechecks fine
Metadata
Metadata
Assignees
Labels
No labels