diff --git a/types/pendo-io-agent/index.d.ts b/types/pendo-io-browser/index.d.ts similarity index 98% rename from types/pendo-io-agent/index.d.ts rename to types/pendo-io-browser/index.d.ts index 6429f3b95b..dfc04e25d4 100644 --- a/types/pendo-io-agent/index.d.ts +++ b/types/pendo-io-browser/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for Pendo.io Agent 2.16 +// Type definitions for non-npm package Pendo.io Agent 2.16 // Project: https://www.pendo.io/ // Definitions by: Aaron Beall // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 declare namespace pendo { interface Identity { diff --git a/types/pendo-io-agent/pendo-io-agent-tests.ts b/types/pendo-io-browser/pendo-io-browser-tests.ts similarity index 88% rename from types/pendo-io-agent/pendo-io-agent-tests.ts rename to types/pendo-io-browser/pendo-io-browser-tests.ts index 575b039686..16db208cda 100644 --- a/types/pendo-io-agent/pendo-io-agent-tests.ts +++ b/types/pendo-io-browser/pendo-io-browser-tests.ts @@ -34,13 +34,13 @@ pendo.identify({ pendo.debugging.getEventCache(); pendo.events - .ready(function () { + .ready(() => { // Do something once `pendo.isReady()` would return `true` }) - .guidesLoaded(function () { + .guidesLoaded(() => { // Do something when Guides load }) - .guidesFailed(function () { + .guidesFailed(() => { // Do something when Guides fail to load }); @@ -49,7 +49,7 @@ pendo.initialize({ visitor: { id: "" }, account: { id: "" }, events: { - ready: function () { + ready() { // Do something when pendo is initialized } } @@ -63,15 +63,14 @@ pendo.track("User Registered", { try { throw new Error(); -} -catch (error) { +} catch (error) { pendo.track("JIRA-12345--error-tripped", { message: error.message, stack: error.stack }); } -pendo.dom("").closest('._pendo-guide-next_') +pendo.dom("").closest('._pendo-guide-next_'); pendo.onGuideAdvanced(); pendo.onGuideAdvanced({ steps: 2 }); diff --git a/types/pendo-io-agent/tsconfig.json b/types/pendo-io-browser/tsconfig.json similarity index 87% rename from types/pendo-io-agent/tsconfig.json rename to types/pendo-io-browser/tsconfig.json index 4ee19675e0..e5b8fc4c3f 100644 --- a/types/pendo-io-agent/tsconfig.json +++ b/types/pendo-io-browser/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "module": "commonjs", "lib": [ "es6", "dom" @@ -18,6 +19,6 @@ }, "files": [ "index.d.ts", - "pendo-io-agent-tests.ts" + "pendo-io-browser-tests.ts" ] } diff --git a/types/pendo-io-agent/tslint.json b/types/pendo-io-browser/tslint.json similarity index 100% rename from types/pendo-io-agent/tslint.json rename to types/pendo-io-browser/tslint.json