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}` | `${k & string}.**` : never; }[_WatchKeys]> = { [k in secondKeys]?: (newValue: IfExtends, "**", TWatchData[getFirstKeys], NonNullable<(Exclude], null>)[getLastKeys]>>) => void | Promise; }; export type ObserversOption = { observers?: IfExtends<{}, TWatchData, EmptyObject, NoInfer<{ [k in _WatchKeys | "**"]?: (newValue: k extends keyof TWatchData ? TWatchData[k] : unknown) => void | Promise; } & { [k in _WatchKeys as never]: unknown; } & AddFieldsOfObject>>; }; export {};