const getValue = (value: unknown) => {
if (G.isDate(value)) return value.toISOString().split("T")[0];
if (G.isNumber(value)) return value.toString();
return value;
};
i'm not certain this is an error, but if is the expected result i am uncertain of why. if i change the input type to any then isNumber gives me a never result:
just curious, the current type of isDate is <A>(value:A) => value is Extract<A, Date>. why not just simply <A>(value:A) => value is Date? is there reason not to be?
Hi i'm getting the following error:
from the following code:
i'm not certain this is an error, but if is the expected result i am uncertain of why. if i change the input type to
any
thenisNumber
gives me anever
result: