Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "store"

Index

Variables

Const getOption

getOption: GetFromStoreFunction<PRestGlobalOptions> = getFromStore<PRestGlobalOptions>(globalOptions)

This function get a property inside globalOptions object

Example

 import { getOptions } from 'prest-node';

 const requestProtocol = getOptions('requestProtocol');

Const getOptions

getOptions: AccessStoreFunction<PRestGlobalOptions> = accessStore<PRestGlobalOptions>(globalOptions)

This function access globalOptions object and be able to return the entire object

Example

 import { getOptions } from 'prest-node';

 const opts = getOptions('requestProtocol');
 // opts.requestProtocol

Const setOption

setOption: SetInStoreFunction<PRestGlobalOptions> = setInStore<PRestGlobalOptions>(globalOptions)

This function set a property inside globalOptions object

Example

 import { setOption } from 'prest-node';

 setOption('requestProtocol', 'https');

Functions

Const accessStore

  • accessStore<T>(store: T): AccessStoreFunction<T>
  • This function create a function that access a private object with PRest client options

    Type parameters

    • T

    Parameters

    • store: T

    Returns AccessStoreFunction<T>

Const getFromStore

  • getFromStore<T>(store: T): GetFromStoreFunction<T>
  • This function create a function that acting as a getter for a private object

    Type parameters

    • T

    Parameters

    • store: T

    Returns GetFromStoreFunction<T>

Const setInStore

  • setInStore<T>(store: T): SetInStoreFunction<T>
  • This function create a function that acting as a setter for a private object

    Type parameters

    • T

    Parameters

    • store: T

    Returns SetInStoreFunction<T>

Object literals

Const globalOptions

globalOptions: object

requestProtocol

requestProtocol: "http" = "http"

Generated using TypeDoc