From 41cccf2010503dfaae724d4f9002970ab2a56a51 Mon Sep 17 00:00:00 2001 From: Nodarii Date: Sat, 24 Aug 2019 08:47:45 +0300 Subject: [PATCH] gtag.js: add support for 'js' command (#37862) --- types/gtag.js/gtag.js-tests.ts | 1 + types/gtag.js/index.d.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/types/gtag.js/gtag.js-tests.ts b/types/gtag.js/gtag.js-tests.ts index c25db26c5f..1711b53eab 100644 --- a/types/gtag.js/gtag.js-tests.ts +++ b/types/gtag.js/gtag.js-tests.ts @@ -6,6 +6,7 @@ gtag('event', 'login', { }); gtag('set', {currency: 'USD'}); +gtag('js', new Date()); gtag('set', { country: 'US', currency: 'USD' diff --git a/types/gtag.js/index.d.ts b/types/gtag.js/index.d.ts index e20cc9d4fa..680fa9057b 100644 --- a/types/gtag.js/index.d.ts +++ b/types/gtag.js/index.d.ts @@ -8,6 +8,7 @@ declare namespace Gtag { interface Gtag { (command: 'config', targetId: string, config?: ControlParams | EventParams | CustomParams): void; (command: 'set', config: CustomParams): void; + (command: 'js', config: Date): void; (command: 'event', eventName: EventNames | string, eventParams?: ControlParams | EventParams | CustomParams): void; }