Skip to content

Commit

Permalink
fix(typescript): added types of prompt.checks in interaction policy
Browse files Browse the repository at this point in the history
  • Loading branch information
clairtonluz authored and panva committed Apr 27, 2020
1 parent 90b400a commit 3b97bde
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,13 @@ declare class DefaultPolicy extends Array<interactionPolicy.Prompt> {
add(prompt: interactionPolicy.Prompt, index?: number): void;
}

declare class Checks extends Array<interactionPolicy.Check> {
get(name: string): interactionPolicy.Check;
remove(name: string): void;
clear(): void;
add(prompt: interactionPolicy.Check, index?: number): void;
}

export namespace interactionPolicy {
class Check {
constructor(
Expand Down Expand Up @@ -1536,7 +1543,7 @@ export namespace interactionPolicy {
name: string;
requestable: boolean;
details?: (ctx: KoaContextWithOIDC) => Promise<AnyObject>;
checks: Check[];
checks: Checks;
}

function base(): DefaultPolicy;
Expand Down

0 comments on commit 3b97bde

Please sign in to comment.