-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathaugmented.d.ts
More file actions
31 lines (31 loc) · 838 Bytes
/
augmented.d.ts
File metadata and controls
31 lines (31 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* Service-specific code needs to target a specific `serviceId`, for example
* to check its consent status. You can re-declare this module to override
* the default `string` type of `ServiceId` with an `enum` to support stricter
* type-level checks in your application code.
*
* @example
*
* ```
* enum MyServiceId {
* Service1 = 'service-id-1',
* Service2 = 'service-id-2',
* }
*
* declare module '@s-group/react-usercentrics/augmented' {
* export type ServiceId = MyServiceId
* }
* ```
*
* @example
* ```
* declare module '@s-group/react-usercentrics/augmented' {
* export type ServiceId = import('../config/usercentrics').ServiceId
* }
* ```
*
* @default string
*
* @see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
*/
export type ServiceId = string