Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Merge PR #184: adds types for Segment Integration Settings #215

Closed
wants to merge 2 commits into from
Closed
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
19 changes: 16 additions & 3 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@ export declare namespace SegmentAnalytics {
context?: object;
}

interface IntegrationsSettings {
// TODO remove `any`
[key: string]: any;
type IntegrationsSettings = IntegrationSettings | SegmentIOIntegrationSettings

interface IntegrationSettings {
[key: string]: unknown
}

// TODO: Long term, this should probably live in analytics.js-integrations
interface SegmentIOIntegrationSettings {
addBundledMetadata: boolean;
apiHost?: string;
apiKey?: string;
crossDomainIdServers?: string[];
deleteCrossDomainId?: boolean;
retryQueue: boolean;
saveCrossDomainIdInLocalStorage: boolean;
unbundledIntegrations: any[];
}

interface CookieOptions {
Expand Down