Nymph.js 1.0.0-beta.113
    Preparing search index...
    Index

    Constructors

    Properties

    cache: EntityWeakCache

    The entity cache.

    Entity: typeof Entity

    The entity class for this instance of Nymph.

    headers: { [k: string]: string }

    Headers that will be sent with every request.

    These are used by Tilmeld for authentication.

    pubsub: PubSub | undefined

    And optional PubSub client instance.

    returnNullOnNotFound: boolean

    Return null or empty array instead of error when entity/ies not found.

    Methods

    • Add your class to this instance.

      This will create a class that extends your class within this instance of Nymph and return it. You can then use this class's constructor and methods, which will use this instance of Nymph.

      Because this creates a subclass, don't use the class returned from getEntityClass to check with instanceof. Instead, use the base class that you passed into this method.

      Type Parameters

      Parameters

      • entityClass: T

      Returns T

    • Parameters

      • name: string

      Returns Promise<any>

    • Parameters

      • name: string

      Returns Promise<number>

    • Type Parameters

      • T extends unknown

      Parameters

      • item: T

      Returns T

    • Parameters

      • name: string

      Returns Promise<number>

    • Parameters

      • className: string
      • method: string
      • params: any[]

      Returns Promise<any>

    • Parameters

      • className: string
      • method: string
      • params: any[]

      Returns Promise<AbortableAsyncIterator<any>>

    • Parameters

      • name: string
      • value: number

      Returns Promise<any>