mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-03 19:42:27 +08:00
Add react-amplitude definition
This commit is contained in:
22
types/react-amplitude/index.d.ts
vendored
Normal file
22
types/react-amplitude/index.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// Type definitions for react-amplitude 0.1
|
||||
// Project: https://github.com/rorygarand/react-amplitude
|
||||
// Definitions by: Raymond Ho <https://github.com/rayzor65>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface AmplitudeInstance {
|
||||
init(apiKey: string, userId?: string, config?: any, cb?: () => void): void;
|
||||
amplitude(): void;
|
||||
clearUserProperties(): void;
|
||||
getSessionId(): void;
|
||||
identify(idObj: any, cb: () => void): void;
|
||||
isNewSession(): void;
|
||||
logEvent(eventType: string, eventProperties: {}, cb: () => void): void;
|
||||
logEventWithTimestamp(eventType: string, eventProperties: {}, timestamp: number, cb: () => void): void;
|
||||
resetUserId(): void;
|
||||
setUserId(userId: string): void;
|
||||
setUserProperties(userProps: any): void;
|
||||
}
|
||||
|
||||
declare const Amplitude: AmplitudeInstance;
|
||||
|
||||
export default Amplitude;
|
||||
0
types/react-amplitude/react-amplitude-tests.ts
Normal file
0
types/react-amplitude/react-amplitude-tests.ts
Normal file
22
types/react-amplitude/tsconfig.json
Normal file
22
types/react-amplitude/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-amplitude-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/react-amplitude/tslint.json
Normal file
1
types/react-amplitude/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user