defineConsent
function defineConsent<T>(config): TDefined in: define-consent.ts:20
Identity helper that narrows the type of a consent config so users get
full autocomplete + type-checking in their consent.config.ts.
Type Parameters
| Type Parameter |
|---|
T extends ConsentConfig |
Parameters
| Parameter | Type |
|---|---|
config | T |
Returns
T
Example
import { defineConsent, jurisdictions } from '@tickboxhq/core'
export default defineConsent({ jurisdiction: jurisdictions.UK_DUAA, categories: { necessary: { required: true }, analytics: { vendors: ['plausible'] }, },})