diff --git a/types/new-relic-browser/index.d.ts b/types/new-relic-browser/index.d.ts index 0064ee4ad2..6d9fc22fdc 100644 --- a/types/new-relic-browser/index.d.ts +++ b/types/new-relic-browser/index.d.ts @@ -3,8 +3,6 @@ // Definitions by: Rene Hamburger , Piotr Kubisa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare const newrelic: NewRelic.Browser; - declare namespace NewRelic { interface Browser { /** @@ -186,7 +184,7 @@ declare namespace NewRelic { * Adds a custom SPA attribute only to the current interaction in New Relic Browser. * * @param key Used as the attribute name on the BrowserInteraction event. - * @param Used as the attribute value on the BrowserInteraction event. This can be a + * @param value Used as the attribute value on the BrowserInteraction event. This can be a * string, number, boolean, or object. If it is an object, New Relic serializes it to a JSON string. * @returns This method returns the same API object created by interaction(). * @see https://docs.newrelic.com/docs/browser/new-relic-browser/browser-agent-spa-api/spa-set-attribute @@ -205,3 +203,6 @@ declare namespace NewRelic { setName(name: string, trigger?: string): BrowserInteraction; } } + +declare const api: NewRelic.Browser; +export = api; diff --git a/types/new-relic-browser/new-relic-browser-tests.ts b/types/new-relic-browser/new-relic-browser-tests.ts index b9f75b142d..86ce781e18 100644 --- a/types/new-relic-browser/new-relic-browser-tests.ts +++ b/types/new-relic-browser/new-relic-browser-tests.ts @@ -1,3 +1,5 @@ +import newrelic = require("new-relic-browser"); + // The following tests are largely taken straight from the examples at https://docs.newrelic.com/docs/browser/new-relic-browser/browser-agent-spa-api // --- NewRelic.Browser methods ----------------------------------------------