import { Tuple } from 'ts-essentials' export const tuple = (t: T): T => t // remove readonly modifier on type export type Writeable = { -readonly [P in keyof T]: T[P] } // typeguard to differentiate between a RefObject or a callbackRef export const isRefObject = >(obj: React.Ref): obj is React.RefObject => // eslint-disable-next-line @typescript-eslint/no-explicit-any (obj as any).current !== undefined export type FlowReturn = Generator, TReturn, TNext>