@types/beyonk__gdpr-cookie-consent-banner
TypeScript icon, indicating that this package has built-in type declarations

9.0.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/beyonk__gdpr-cookie-consent-banner

Weekly Downloads

63

Version

9.0.4

License

MIT

Unpacked Size

5.6 kB

Total Files

5

Last publish

Collaborators

  • types