Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
declare module "react-native-mixpanel-bridge" {
/**
* NOTE: This is quite a literal copy of the type definitions
* generated in definitelyTyped repo for react-native-mixpanel
*/

// Project: https://github.com/davodesign84/react-native-mixpanel#readme
// Definitions by: Andrew Makarov <https://github.com/r3nya>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

export function sharedInstanceWithToken(token: string): void;
export function track(event: string): void;
export function trackWithProperties(event: string, property: object): void;
export function createAlias(id: string): void;
export function identify(id: string): void;
export function set(property: object): void;
export function setOnce(property: object): void;
export function timeEvent(event: string): void;
export function registerSuperProperties(property: object): void;
export function registerSuperPropertiesOnce(property: object): void;
export function trackCharge(id: number): void;
export function trackChargeWithProperties(id: number, property: object): void;
export function increment(property: string, value: number): void;
export function setPushRegistrationId(token: string): void;
export function initPushHandling(token: string): void;
export function clearPushRegistrationId(): void;
export function addPushDeviceToken(token: string): void;
export function reset(): void;
export function getDistinctId(handler: (id: string) => void): void;
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"repository": "http://github.com/projetoeureka/react-native-mixpanel-bridge",
"license": "MIT",
"types": "index.d.ts",
"rnpm": {
"ios": {
"sharedLibraries": [
Expand Down