generated from garronej/ts-ci
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop making params providable as a promise, bug fix
- Loading branch information
Showing
4 changed files
with
33 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { createOidcReactApi_dependencyInjection } from "../react/react"; | ||
import { createMockOidc, type ParamsOfCreateMockOidc } from "./oidc"; | ||
import { PromiseOrNot } from "../tools/PromiseOrNot"; | ||
import type { ValueOrAsyncGetter } from "../tools/ValueOrAsyncGetter"; | ||
|
||
/** @see: https://docs.oidc-spa.dev/documentation/mock */ | ||
export function createMockReactOidc< | ||
DecodedIdToken extends Record<string, unknown> = Record<string, unknown>, | ||
IsAuthGloballyRequired extends boolean = false | ||
>(params: PromiseOrNot<ParamsOfCreateMockOidc<DecodedIdToken, IsAuthGloballyRequired>>) { | ||
>(params: ValueOrAsyncGetter<ParamsOfCreateMockOidc<DecodedIdToken, IsAuthGloballyRequired>>) { | ||
return createOidcReactApi_dependencyInjection(params, createMockOidc); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type ValueOrAsyncGetter<T> = T | (() => Promise<T>); |
This file was deleted.
Oops, something went wrong.