1import { ParsedQs } from 'qs'; 2 3export type QueryParams = ParsedQs; 4 5export type ParsedURL = { 6 scheme: string | null; 7 hostname: string | null; 8 path: string | null; 9 queryParams: QueryParams | null; 10}; 11 12export type CreateURLOptions = { 13 /** 14 * URI protocol `<scheme>://` that must be built into your native app. 15 */ 16 scheme?: string; 17 /** 18 * An object of parameters that will be converted into a query string. 19 */ 20 queryParams?: QueryParams; 21 /** 22 * Should the URI be triple slashed `scheme:///path` or double slashed `scheme://path`. 23 */ 24 isTripleSlashed?: boolean; 25}; 26 27export type EventType = { url: string; nativeEvent?: MessageEvent }; 28 29export type URLListener = (event: EventType) => void; 30 31export type NativeURLListener = (nativeEvent: MessageEvent) => void; 32