From 3b97bdef30e287893ba28c9893b9638efde9eb59 Mon Sep 17 00:00:00 2001 From: Clairton Luz Date: Fri, 24 Apr 2020 10:59:44 -0300 Subject: [PATCH] fix(typescript): added types of prompt.checks in interaction policy --- types/index.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 7c07d0fbe..c2cb3b334 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1506,6 +1506,13 @@ declare class DefaultPolicy extends Array { add(prompt: interactionPolicy.Prompt, index?: number): void; } +declare class Checks extends Array { + get(name: string): interactionPolicy.Check; + remove(name: string): void; + clear(): void; + add(prompt: interactionPolicy.Check, index?: number): void; +} + export namespace interactionPolicy { class Check { constructor( @@ -1536,7 +1543,7 @@ export namespace interactionPolicy { name: string; requestable: boolean; details?: (ctx: KoaContextWithOIDC) => Promise; - checks: Check[]; + checks: Checks; } function base(): DefaultPolicy;