Installation
npm install --save @types/react-amplitude
Summary
This package contains type definitions for react-amplitude (https://github.com/rorygarand/react-amplitude).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-amplitude.
index.d.ts
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;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by Raymond Ho.