Skip to content

Commit

Permalink
feat: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
akashrpo committed Feb 29, 2024
1 parent 865c88e commit 88cacb6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions dataCatalogTypescript/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17.1
2 changes: 1 addition & 1 deletion dataCatalogTypescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderlabs/rudder-typer-webapp",
"version": "1.0.0-beta.8",
"version": "1.0.0-beta.10",
"description": "Rudder-Typer analytics libraries are based on your pre-defined tracking plan specifications.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions dataCatalogTypescript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export type ViolationHandler = (
) => void

let analytics: () => any | undefined = () => {
return window.analytics
return window.rudderanalytics
}

/** Options to customize the runtime behavior of a RudderTyper client. */
export interface RudderTyperOptions {
/**
* Underlying analytics instance where analytics calls are forwarded on to.
* Defaults to window.analytics.
* Defaults to window.rudderanalytics.
*/
analytics?: any
/**
Expand Down Expand Up @@ -54,7 +54,7 @@ export interface RudderTyperOptions {
*/
export function setRudderTyperOptions(options: RudderTyperOptions) {
analytics = options.analytics
? () => options.analytics || window.analytics
? () => options.analytics || window.rudderanalytics
: analytics
}

Expand Down
2 changes: 1 addition & 1 deletion dataCatalogTypescript/src/rudder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
declare global {
interface Window {
analytics: any
rudderanalytics: any
}
}

Expand Down

0 comments on commit 88cacb6

Please sign in to comment.