Skip to content

Commit ae019cb

Browse files
committed
fix: bring back set type
1 parent 009a9b4 commit ae019cb

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/logging/src/analytics-helpers.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import fs from 'fs';
22
import path from 'path';
3-
import type { IdentifyParams as SegmentIdentity } from '@segment/analytics-node';
43

5-
export type MongoshAnalyticsIdentity = Pick<
6-
SegmentIdentity,
7-
'userId' | 'anonymousId'
8-
>;
4+
export type MongoshAnalyticsIdentity =
5+
| {
6+
userId: string;
7+
anonymousId?: never;
8+
}
9+
| {
10+
userId?: never;
11+
anonymousId: string;
12+
};
913

1014
export type AnalyticsIdentifyMessage = MongoshAnalyticsIdentity & {
1115
traits: {

0 commit comments

Comments
 (0)