Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit f865d48

Browse files
authored
fix: match identify and reset client methods arguments, add token to context (segmentio#533)
1 parent 4508ad4 commit f865d48

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/core/src/client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ export const useAnalytics = (): ClientMethods => {
6464
flush: () => client.flush(),
6565
group: (...args) => client.group(...args),
6666
alias: (...args) => client.alias(...args),
67-
reset: () => client.reset(),
67+
reset: (...args) => client.reset(...args),
6868
};
6969
};

packages/core/src/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ export type Config = {
128128
export type ClientMethods = {
129129
screen: (name: string, properties?: JsonMap) => void;
130130
track: (event: string, properties?: JsonMap) => void;
131-
identify: (userId: string, userTraits?: UserTraits) => void;
131+
identify: (userId?: string, userTraits?: UserTraits) => void;
132132
flush: () => Promise<void>;
133133
group: (groupId: string, groupTraits?: GroupTraits) => void;
134134
alias: (newUserId: string) => void;
135-
reset: () => void;
135+
reset: (resetAnonymousId?: boolean) => void;
136136
};
137137

138138
type ContextApp = {
@@ -152,6 +152,7 @@ export type ContextDevice = {
152152
adTrackingEnabled?: boolean; // ios only
153153
advertisingId?: string; // ios only
154154
trackingStatus?: string;
155+
token?: string;
155156
};
156157

157158
type ContextLibrary = {

0 commit comments

Comments
 (0)