export type { AnyObject, Dictionary } from 'pinejs-client-core'; type Overwrite = Pick> & U; export type RequiredField = Overwrite< T, Required> >; export type OptionalField = Overwrite< T, Partial> >; export type Resolvable = R | PromiseLike; export type Tail = T extends [any, ...infer U] ? U : never; /** * Ideally this would be a deep readonly but that causes typescript to complain about excessively deep instantiation so a single level is the compromise, * meaning that it's actually 1st and 3rd+ level writable */ export type ShallowWritableOnly = { [P in keyof T]: Readonly; };