I'd like to represent an object containing st8 values (is that the right nomenclature?), but ReturnType<typeof useSt8> isn't syntactically allowed to include a <T> generic value.
type St8Number= ReturnType<typeof useSt8<number>>;
// '>' expected.ts(1005)
I'd be happy to send a PR that splits out a standalone type returned by useSt8:
export type St8<T> = {
(): T;
(newValue: T | ((current: T) => T)): void;
};
export default function useSt8<T>(i: (() => T) | T): St8<T>;
Thanks for this library, it's really nifty!
I'd like to represent an object containing st8 values (is that the right nomenclature?), but
ReturnType<typeof useSt8>
isn't syntactically allowed to include a<T>
generic value.I'd be happy to send a PR that splits out a standalone type returned by
useSt8
: