NymphOptions: {
    WebSocket?: typeof WebSocket;
    fetch?: WindowOrWorkerGlobalScope["fetch"];
    noAutoconnect?: boolean;
    noConsole?: boolean;
    pubsubUrl?: string;
    renewTokens?: boolean;
    restUrl: string;
    weakCache?: boolean;
}

Type declaration

  • Optional WebSocket?: typeof WebSocket

    A WebSocket implementation.

  • Optional fetch?: WindowOrWorkerGlobalScope["fetch"]

    A fetch implementation.

  • Optional noAutoconnect?: boolean

    Don't automatically try to connect to PubSub server.

  • Optional noConsole?: boolean

    Whether to not output status messages to the console.

  • Optional pubsubUrl?: string

    The URL of your Nymph PubSub server.

  • Optional renewTokens?: boolean

    Whether to renew tokens when a request is made.

    If you turn this off, the client will request that the server not renew an authentication token, even if it is within the renewal time of the expiration date.

    This defaults to true.

  • restUrl: string

    The URL of your Nymph REST server.

  • Optional weakCache?: boolean

    Use a WeakRef based cache of entities.

    This ensures all entities returned are the same instance if they have the same class and GUID. This also means that whenever an entity is returned from the server, the single instance in memory will be refreshed. This could have annoying results, like destroying dirty data (the dreaded triple-D).

    This could also be a potential source of memory leaks. Although the entities themselves are referenced weakly so they get garbage collected, the GUID used as a key and the WeakRef object itself are not weak references, so not destroyed when the instance is garbage collected.

    However, even with these caveats, this might help you if you have a big app with the same entities stored in several different places in memory. This can help to synchronize them correctly and avoid data conflicts.

Generated using TypeDoc