Type Parameters

  • T = any

Constructors

Properties

hooks: {
    post: {
        remove: (data: any) => Bluebird<any>[];
        save: (data: any) => Bluebird<any>[];
    };
    pre: {
        remove: (data: any) => Bluebird<any>[];
        save: (data: any) => Bluebird<any>[];
    };
}
methods: Record<string, (this: T, ...args: any[]) => any> = {}
paths: Record<string, default<any>> = {}
stacks: {
    export: (data: object) => void[];
    getter: (data: object) => void[];
    import: (data: object) => void[];
    setter: (data: object) => void[];
}
statics: Record<string, (this: default<T>, ...args: any[]) => any> = {}
Types: types
Types: types = Types

Methods

  • Adds a instance method.

    Parameters

    • name: string
    • fn: (this: T, ...args: any[]) => any

    Returns void

  • Adds a post-hook.

    Parameters

    • type: "remove" | "save"

      Hook type. One of save or remove.

    • fn: (...args: any[]) => void

    Returns void

  • Adds a pre-hook.

    Parameters

    • type: "remove" | "save"

      Hook type. One of save or remove.

    • fn: (...args: any[]) => void

    Returns void

  • Adds a static method.

    Parameters

    • name: string
    • fn: (this: default<T>, ...args: any[]) => any

    Returns void

  • Adds a virtual path.

    Parameters

    • name: string
    • Optionalgetter: (this: T) => any

    Returns default<T>