@rikishi/watermelondb
Version:
Build powerful React Native and React web apps that scale from hundreds to tens of thousands of records and remain fast
19 lines (15 loc) • 659 B
TypeScript
declare module '@rikishi/watermelondb/utils/common/makeDecorator' {
import { ReplaceReturn } from '@rikishi/watermelondb/utils/common'
export type Descriptor = Object
export type RawDecorator = (target: Object, key: string, descriptor: Descriptor) => Descriptor
export type RawDecoratorFactory<T extends any[]> = (...any: T) => RawDecorator
export type Decorator<
Args extends any[],
Factory extends RawDecoratorFactory<Args>
// TODO: fix
> = ReplaceReturn<Args, Descriptor | RawDecorator, Factory>
export default function makeDecorator<
Args extends any[],
T extends RawDecoratorFactory<Args>
>(): Decorator<Args, T>
}