type Primitive = string | number | boolean | symbol | bigint | null | undefined; type IsReadonly = (() => F extends { [P in Property]: This[Property]; } ? 1 : 2) extends (() => F extends { -readonly [P in Property]: This[Property]; } ? 1 : 2) ? false : true; type Callback = (this: This, field: string | symbol, newValue: unknown) => void; type ReturnType = IsReadonly extends true ? (_: undefined, ctx: ClassFieldDecoratorContext) => void : This[Property] extends Primitive ? (_: undefined, ctx: ClassFieldDecoratorContext) => void : never; declare function reactive(cb: Value extends Primitive ? Callback : never): ReturnType; declare function reactive(watchedFields: Value extends Primitive ? never : Array, cb: Callback): ReturnType; export default reactive;