Skip to content

Commit 745b543

Browse files
committed
feat(poool-engage): format files
1 parent 3ed06b5 commit 745b543

2 files changed

Lines changed: 43 additions & 44 deletions

File tree

types/poool-engage/index.d.ts

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
declare global {
32
var Engage: PooolEngage.Engage;
43
/**
@@ -41,7 +40,7 @@ export namespace PooolEngage {
4140
*
4241
* More infos: https://www.poool.dev/docs/engage/javascript/configuration#stripepublickey
4342
*/
44-
stripePublicKey?: string
43+
stripePublicKey?: string;
4544

4645
/**
4746
* The locale used by default texts inside elements.
@@ -50,7 +49,7 @@ export namespace PooolEngage {
5049
*
5150
* More infos: https://www.poool.dev/docs/engage/javascript/configuration#locale
5251
*/
53-
locale?: "fr" | "en"
52+
locale?: "fr" | "en";
5453

5554
/**
5655
* Enable/disable automatic Piano tracking for particular events.
@@ -60,7 +59,7 @@ export namespace PooolEngage {
6059
*
6160
* More infos: https://www.poool.dev/docs/engage/javascript/configuration#pianoautotrackingenabled
6261
*/
63-
pianoAutoTrackingEnabled?: boolean
62+
pianoAutoTrackingEnabled?: boolean;
6463

6564
/**
6665
* Enable/disable automatic Google Analytics 4 tracking (Google Analytics 4 tag required) for particular events.
@@ -70,7 +69,7 @@ export namespace PooolEngage {
7069
*
7170
* More infos: https://www.poool.dev/docs/engage/javascript/configuration#gtagautotrackingenabled
7271
*/
73-
gtagAutoTrackingEnabled?: boolean
72+
gtagAutoTrackingEnabled?: boolean;
7473
}
7574

7675
interface EngageConfig {
@@ -125,40 +124,43 @@ export namespace PooolEngage {
125124
(variables: { [key: string]: string | number | boolean }): Engage;
126125
}
127126

128-
type EngageEventsList = 'ready'
129-
| 'seen'
130-
| 'click'
131-
| 'formSubmit'
132-
| 'destroy'
133-
| 'error';
127+
type EngageEventsList =
128+
| "ready"
129+
| "seen"
130+
| "click"
131+
| "formSubmit"
132+
| "destroy"
133+
| "error";
134134

135-
type EngageTextsType = 'form_optional'
136-
| 'form_no_options'
137-
| 'form_error'
138-
| 'form_error_required_field'
139-
| 'form_error_invalid_field'
140-
| 'form_error_invalid_email_field'
141-
| 'form_error_invalid_phone_field'
142-
| 'form_error_invalid_date_field'
143-
| 'form_error_invalid_credit_card_field'
144-
| 'form_error_non_existent_email';
135+
type EngageTextsType =
136+
| "form_optional"
137+
| "form_no_options"
138+
| "form_error"
139+
| "form_error_required_field"
140+
| "form_error_invalid_field"
141+
| "form_error_invalid_email_field"
142+
| "form_error_invalid_phone_field"
143+
| "form_error_invalid_date_field"
144+
| "form_error_invalid_credit_card_field"
145+
| "form_error_non_existent_email";
145146

146-
type EngageDisplayConditionsType = 'target'
147-
| 'delay'
148-
| 'scroll'
149-
| 'views'
150-
| 'viewsPerDay'
151-
| 'visits'
152-
| 'device'
153-
| 'geoloc'
154-
| 'url'
155-
| 'referrer'
156-
| 'date'
157-
| 'time'
158-
| 'customFilter'
159-
| 'priority'
160-
| 'and'
161-
| 'or';
147+
type EngageDisplayConditionsType =
148+
| "target"
149+
| "delay"
150+
| "scroll"
151+
| "views"
152+
| "viewsPerDay"
153+
| "visits"
154+
| "device"
155+
| "geoloc"
156+
| "url"
157+
| "referrer"
158+
| "date"
159+
| "time"
160+
| "customFilter"
161+
| "priority"
162+
| "and"
163+
| "or";
162164

163165
interface EngageDisplayConditions {
164166
id: string;
@@ -169,7 +171,7 @@ export namespace PooolEngage {
169171
interface EngageElement {
170172
slug: string;
171173
name: string;
172-
conditions: EngageDisplayConditions[]
174+
conditions: EngageDisplayConditions[];
173175
/**
174176
* Destroys the element
175177
*
@@ -256,7 +258,6 @@ export namespace PooolEngage {
256258
texts: EngageTexts;
257259

258260
/**
259-
*
260261
* @param event the event name
261262
* @param callback the event callback
262263
* @returns the Engage instance
@@ -266,7 +267,6 @@ export namespace PooolEngage {
266267
on(event: EngageEventsList, callback: (...props: any) => any): Engage;
267268

268269
/**
269-
*
270270
* @param event the event name
271271
* @param callback the event callback
272272
* @returns the Engage instance
@@ -303,6 +303,6 @@ export namespace PooolEngage {
303303
*
304304
* More infos: https://www.poool.dev/docs/engage/javascript/methods#commitpageview
305305
*/
306-
commitPageView (): Engage
306+
commitPageView(): Engage;
307307
}
308308
}

types/poool-engage/poool-engage-tests.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ engage.config(
4040
// $ExpectType Engage
4141
engage.config(
4242
{
43-
locale: "en",
44-
stripePublicKey: "pk_test_123",
43+
locale: "en",
44+
stripePublicKey: "pk_test_123",
4545
},
4646
true,
4747
);
@@ -67,7 +67,6 @@ engage.texts(
6767
"en",
6868
);
6969

70-
7170
// $ExpectType Engage
7271
engage.variables("key", "value");
7372

0 commit comments

Comments
 (0)