Skip to content

Commit f09a046

Browse files
committed
Optimize imports and rebase
1 parent 5d5de8e commit f09a046

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

packages/optimizely-sdk/lib/index.d.ts

+4-17
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ declare module '@optimizely/optimizely-sdk' {
3535

3636
export type OptimizelyConfig = import('./shared_types').OptimizelyConfig;
3737

38+
export type EventTags = import ('./shared_types').EventTags;
39+
40+
export type Event = import ('./shared_types').Event;
41+
3842
export interface DatafileOptions {
3943
autoUpdate?: boolean;
4044
updateInterval?: number;
@@ -141,19 +145,6 @@ declare module '@optimizely/optimizely-sdk' {
141145
close(): Promise<{ success: boolean; reason?: string }>;
142146
}
143147

144-
// An event to be submitted to Optimizely, enabling tracking the reach and impact of
145-
// tests and feature rollouts.
146-
export interface Event {
147-
// URL to which to send the HTTP request.
148-
url: string;
149-
// HTTP method with which to send the event.
150-
httpVerb: 'POST';
151-
// Value to send in the request body, JSON-serialized.
152-
// TODO[OASIS-6649]: Don't use any type
153-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
154-
params: any;
155-
}
156-
157148
export interface EventDispatcher {
158149
/**
159150
* @param event
@@ -165,10 +156,6 @@ declare module '@optimizely/optimizely-sdk' {
165156
dispatchEvent: (event: Event, callback: (response: { statusCode: number; }) => void) => void;
166157
}
167158

168-
export type EventTags = {
169-
[key: string]: string | number | null;
170-
};
171-
172159
// NotificationCenter-related types
173160
export interface NotificationCenter {
174161
addNotificationListener<T extends ListenerPayload>(

packages/optimizely-sdk/lib/shared_types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export interface DatafileOptions {
3030
datafileAccessToken?: string;
3131
}
3232

33+
// An event to be submitted to Optimizely, enabling tracking the reach and impact of
34+
// tests and feature rollouts.
3335
export interface Event {
3436
// URL to which to send the HTTP request.
3537
url: string;

0 commit comments

Comments
 (0)