Options
All
  • Public
  • Public/Protected
  • All
Menu

Module webview/client

Index

References

Re-exports NoneChannel
Re-exports NoneUser

Type aliases

ClientEventContext<Authenticator, Value>: { auth: ContextOfAuthenticator<Authenticator>; authenticator: Authenticator; event: WebviewEvent<Value, UserOfAuthenticator<Authenticator>> }

Type parameters

Type declaration

ClientOptions<Authenticator>: { authApiUrl?: string; authPlatforms: Authenticator[]; mockupMode?: boolean; platform?: string; webSocketUrl?: string }

Type parameters

Type declaration

  • Optional authApiUrl?: string

    URL of the auth backend API. Default to "/auth"

  • authPlatforms: Authenticator[]

    Authenticators of the platforms.

  • Optional mockupMode?: boolean

    When set to true, the underlying network operations would not be executed. It's useful for server rendering at server side.

  • Optional platform?: string

    Secify the platform to login. Default to the value of platform querystring

  • Optional webSocketUrl?: string

    URL string to connect WebSocket backend. Default to "/websocket"

EventContextOfClient<Client>: Client extends default<infer Authenticator, infer Value> ? ClientEventContext<Authenticator, Value> : never

Type parameters

Functions

  • useClient<Authenticator, Value>(options: ClientOptions<Authenticator>): default<Authenticator, Value>
  • useEventReducer<T, Client>(client: Client, reducer: (value: T, context: EventContextOfClient<Client>) => T, initialValue: T): T

Generated using TypeDoc