import type { ReadonlyDeep } from "hry-types/src/Any/_api"; import type { IfExtends } from "hry-types/src/Any/IfExtends"; import type { IsPureObject } from "hry-types/src/Any/IsPureObject"; import type { NoInfer } from "hry-types/src/Generic/NoInfer"; import type { EmptyObject } from "hry-types/src/Misc/EmptyObject"; type getFirstKeys = T extends `${infer F}.${string}` ? F : never; type getLastKeys = T extends `${string}.${infer L}` ? L : never; type AddFieldsOfObject> extends true ? `${k & string}.${(keyof Exclude) & string}` : never; }[_WatchKeys]> = { [k in _WatchKeys as IsPureObject> extends true ? `${k & string}.${(keyof Exclude) & string}` : never]?: unknown; } & { [k in secondKeys]?: (newValue: ReadonlyDeep<(Exclude], null>)[getLastKeys] & {}>, oldValue: ReadonlyDeep<(Exclude], null>)[getLastKeys]>) => void; }; export type WatchOption = { watch?: IfExtends<{}, TWatchData, EmptyObject, NoInfer<{ [k in _WatchKeys]?: (newValue: ReadonlyDeep>, oldValue: ReadonlyDeep) => void; } & { [k in _WatchKeys as never]: unknown; } & AddFieldsOfObject>>; }; export {};