Skip to content

Commit

Permalink
[Package] Update @types/[email protected] package - had to silent wa…
Browse files Browse the repository at this point in the history
…rnings due to bad TS defs
  • Loading branch information
Vadorequest committed Apr 3, 2020
1 parent b1d6ff7 commit 6f77b16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"devDependencies": {
"@now/node": "1.5.0",
"@svgr/cli": "5.3.0",
"@types/amplitude-js": "4.4.5",
"@types/amplitude-js": "5.8.0",
"@types/cookies": "0.7.4",
"@types/jest": "25.1.5",
"@types/js-cookie": "2.2.5",
Expand Down
2 changes: 2 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,15 @@ class NRNApp extends NextApp {
// XXX See https://github.com/amplitude/Amplitude-JavaScript/issues/223
visitor.setOnce('initial_lang', pageProps.lang); // DA Helps figuring out if the initial language (auto-detected) is changed afterwards
// DA This will help track down the users who discovered our platform because of an iframe
// @ts-ignore See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/43598
visitor.setOnce('initial_iframe', isInIframe);
visitor.setOnce('initial_iframeReferrer', iframeReferrer);

// XXX We must set all other "must-have" properties here (instead of below, as userProperties), because react-amplitude will send the next "page-displayed" event BEFORE sending the $identify event
// Thus, it'd store the first event with an associated user who has not defined "customer.ref", "lang", etc... and that'd break our stats (following events would be correct, only the first event of a new user would be wrong)
visitor.setOnce('customer.ref', layoutProps.customerRef);
visitor.setOnce('lang', pageProps.lang);
// @ts-ignore See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/43598
visitor.setOnce('iframe', isInIframe);
visitor.setOnce('iframeReferrer', iframeReferrer);

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1674,10 +1674,10 @@
merge-deep "^3.0.2"
svgo "^1.2.2"

"@types/amplitude-js@4.4.5":
version "4.4.5"
resolved "https://registry.yarnpkg.com/@types/amplitude-js/-/amplitude-js-4.4.5.tgz#055e86e563a20f051cb5b3c4c55082fd506c9dd7"
integrity sha512-YR+RiijzRh0Mq3gD1qnRvEzfnuGmDCB5kxj8fEtoNHPOIxlQlx7bz/GMgM4+h7vBAsBDvQLs7AHOFzFkKUFxpw==
"@types/amplitude-js@5.8.0":
version "5.8.0"
resolved "https://registry.yarnpkg.com/@types/amplitude-js/-/amplitude-js-5.8.0.tgz#6e4047b0021e73246c00ae6119b47b28ac73859a"
integrity sha512-thNXK9K5SDOs21qbYgbRIofIgSV/8PVRmQ5fWD2BcRfat6XJVXRJ69b7P6roAHxMsy6ugd096SsWYjKork+GUA==

"@types/babel__core@^7.1.0":
version "7.1.6"
Expand Down

0 comments on commit 6f77b16

Please sign in to comment.