-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3302 from Emurgo/release/5.0
Release / 5.0
- Loading branch information
Showing
455 changed files
with
22,777 additions
and
8,689 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"Zone": "us", | ||
"OrgId": "208651", | ||
"WorkspaceId": "67ef75aa-dab0-42d1-969d-f186d253bda8", | ||
"SourceId": "829bd2d4-930e-40f5-b717-a9ed8e1235e1", | ||
"Runtime": "browser:typescript-ampli-v2", | ||
"Platform": "Browser", | ||
"Language": "TypeScript", | ||
"SDK": "@amplitude/analytics-browser@^1.0", | ||
"Branch": "main", | ||
"Version": "7.0.0", | ||
"VersionId": "a0985241-d0c0-4bda-bc6d-271830af0067", | ||
"Path": "./ampli" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
The coerce the TypeScript Amplitude wrapper to work with flow, do these: | ||
|
||
``` | ||
npm run metrics:pull | ||
``` | ||
|
||
``` | ||
cd ampli | ||
``` | ||
|
||
|
||
``` | ||
npx -p typescript tsc index.ts --outDir . -d -m es6 | ||
``` | ||
|
||
``` | ||
npx flowgen --interface-records --no-inexact --add-flow-header -o index.js.flow index.d.ts | ||
``` | ||
|
||
``` | ||
sed -i 's/amplitude\.Types\.\w*/any/' index.js.flow | ||
sed -i '/export type BaseEvent/d' index.js.flow | ||
``` | ||
|
||
Edit `ampli.js.flow` to add the line `class BaseEvent {}`. | ||
|
||
Then we have flow-typed ampli library where all event trigger functions are strongly typed. | ||
To use this libray, import like this from source code: | ||
``` | ||
import type { LoadOptionsWithEnvironment } from '../../../ampli/index'; | ||
``` | ||
instead of | ||
``` | ||
import type { LoadOptionsWithEnvironment } from '../../../ampli'; | ||
``` | ||
Due to perhaps a bug in flow, the later short-circuits type checking. | ||
|
Oops, something went wrong.