From de7dd93827edbcf6ee7afaac4e7fb4061743b332 Mon Sep 17 00:00:00 2001 From: Cleison Stein Date: Tue, 19 Jun 2018 15:07:18 -0300 Subject: [PATCH] Fix addPageAction type --- types/new-relic-browser/index.d.ts | 2 +- types/new-relic-browser/new-relic-browser-tests.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/new-relic-browser/index.d.ts b/types/new-relic-browser/index.d.ts index 6d9fc22fdc..1f390778db 100644 --- a/types/new-relic-browser/index.d.ts +++ b/types/new-relic-browser/index.d.ts @@ -25,7 +25,7 @@ declare namespace NewRelic { * The key will report to Insights as its own PageAction attribute with the specified values. * @see https://docs.newrelic.com/docs/browser/new-relic-browser/browser-agent-spa-api/addPageAction */ - addPageAction(name: string, attributes: { [key: string]: string }): void; + addPageAction(name: string, attributes: { [key: string]: string | number }): void; /** * Adds a JavaScript object with a custom name, start time, etc. to an in-progress session trace. diff --git a/types/new-relic-browser/new-relic-browser-tests.ts b/types/new-relic-browser/new-relic-browser-tests.ts index 86ce781e18..b593f335e1 100644 --- a/types/new-relic-browser/new-relic-browser-tests.ts +++ b/types/new-relic-browser/new-relic-browser-tests.ts @@ -9,6 +9,7 @@ newrelic.addRelease('checkout page', 'a818994'); // addPageAction() newrelic.addPageAction('copy-text-button', { result: 'success' }); +newrelic.addPageAction('async-action', { duration: 3000 }); // addToTrace() newrelic.addToTrace({