expose | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...
    • Expose an API for use by frontend tests in a type-safe way

      Type Parameters

      • T

        Type of the API to expose

      Parameters

      • name: string

        Name of the API

      • api: T

        API object

      Returns T

      import { expose } from "@webhare/test-frontend";
      const authApi = expose("authApi", { isLoggedIn, login });
      export type AuthApi = typeof authApi;

      importExposed to access the exposed API