Skip to content

ConsentApi

type ConsentApi = {
close: () => void;
decisions: Record<string, boolean>;
deny: (id) => void;
denyAll: () => void;
dismissNotice: () => void;
grant: (id) => void;
grantAll: () => void;
isGranted: (id) => boolean;
isOpen: boolean;
noticeOpen: boolean;
open: () => void;
ready: boolean;
reset: () => void;
resolved: ResolvedCategory[];
save: () => void;
storedAt: number | null;
};

Defined in: use-consent.ts:5

Type declaration

NameTypeDefined in
close() => voiduse-consent.ts:19
decisionsRecord<string, boolean>use-consent.ts:9
deny(id) => voiduse-consent.ts:13
denyAll() => voiduse-consent.ts:15
dismissNotice() => voiduse-consent.ts:20
grant(id) => voiduse-consent.ts:12
grantAll() => voiduse-consent.ts:14
isGranted(id) => booleanuse-consent.ts:21
isOpenbooleanuse-consent.ts:7
noticeOpenbooleanuse-consent.ts:8
open() => voiduse-consent.ts:18
readybooleanuse-consent.ts:6
reset() => voiduse-consent.ts:17
resolvedResolvedCategory[]use-consent.ts:10
save() => voiduse-consent.ts:16
storedAtnumber | nulluse-consent.ts:11