Page Contents

Home > @loopback/repository > PrototypeOf

PrototypeOf type

Type helper to infer prototype from a constructor function.

Example: PrototypeOf<typeof Entity> is resolved to Entity.

Signature:

export declare type PrototypeOf<Ctor extends Function> = Ctor extends {
    prototype: infer Proto;
} ? Proto : never;