Installation
npm install --save @types/beyonk__gdpr-cookie-consent-banner
Summary
This package contains type definitions for @beyonk/gdpr-cookie-consent-banner (https://github.com/beyonk-adventures/gdpr-cookie-consent-banner).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/beyonk__gdpr-cookie-consent-banner.
index.d.ts
interface Choice {
label: string;
description: string;
value: boolean;
}
type Category = "necessary" | "tracking" | "analytics" | "marketing";
interface Options {
cookieName?: string;
cookieConfig?: {
domain: string;
path: string;
};
heading?: string;
description?: string;
acceptLabel?: string;
rejectLabel?: string;
settingsLabel?: string;
closeLabel?: string;
choices?: Partial<Record<Category, Choice | false>>;
showEditIcon?: boolean;
categories?: Partial<Record<Category, () => void>>;
}
interface GdprConsentInterface {
attachBanner(bodyElement: HTMLElement, options?: Options): void;
}
declare const GdprConsent: GdprConsentInterface;
// eslint-disable-next-line @definitelytyped/no-declare-current-package
declare module "@beyonk/gdpr-cookie-consent-banner" {
const attachBanner: GdprConsentInterface["attachBanner"];
export default attachBanner;
}
// eslint-disable-next-line @definitelytyped/no-declare-current-package
declare module "@beyonk/gdpr-cookie-consent-banner/dist/esm/bundle.js" {
const attachBanner: GdprConsentInterface["attachBanner"];
export default attachBanner;
}
// eslint-disable-next-line @definitelytyped/no-declare-current-package
declare module "@beyonk/gdpr-cookie-consent-banner/dist/style.css" {}
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: none
Credits
These definitions were written by Ben Grynhaus.