/** * @author Cheng */ interface BrowserInfo { engine: string; // webkit gecko presto trident engineVs: string; platform: string; // desktop mobile supporter: string; // chrome safari firefox opera iexplore edge supporterVs: string; system: string; // windows macos linux android ios systemVs: string; shell: string; // wechat qq uc 360 2345 sougou liebao maxthon shellVs: string; appleType: string; colorScheme: string; } /** * A resolved preference value and its human-readable label. * * @category Browser Information */ interface PreferenceResult { /** Machine-readable value used by application logic. */ value: T; /** Human-readable label suitable for display. */ label: string; } interface DefineListeners { [key: string]: any; } type TestUa = (regexp: RegExp) => boolean; type TestVs = (regexp: RegExp) => string; type MultiValueUrlParams = { [key: string]: string[]; }; type SingleValueUrlParams = { [key: string]: string; }; type ThrottleFunc any> = (...args: Parameters) => ReturnType | null; type DebounceFunc any> = (...args: Parameters) => ReturnType | null; interface IsNumberOptions { isNaNAsNumber?: boolean; isInfinityAsNumber?: boolean; isUnFiniteAsNumber?: boolean; } type AnyFunction = (...args: any[]) => any; interface ZResResponse { status: number; data: { code: number; }; } interface ZResIsValidResOptions { validStatusRange?: [number, number]; validCode?: number[]; } interface RepeatUntilOptions { interval?: number; times?: number; context?: any; args?: Array; } type LoadScriptReturns = Promise; type SimpleType = string | number | boolean | null | undefined; type SimpleObject = { [key: string]: SimpleType | SimpleType[] | SimpleObject | SimpleObject[]; }; type MazeyObject = any; type MazeyFnParams = any[]; type MazeyFnReturn = any; type MazeyFunction = (...args: any[]) => any; type MazeyFn = (...args: MazeyFnParams) => MazeyFnReturn; interface MazeyWindow { [key: string]: any; } interface WebPerformance { [key: string]: string | number; } type MazeyElement = HTMLElement | null; type MazeyDate = Date | string | number; type URLChangeTrigger = "load" | "popstate" | "hashchange" | "pushState" | "replaceState"; interface URLChangeInfo { url: string; oldUrl: string; trigger: URLChangeTrigger; } interface OnURLChangeOptions { fireOnInit?: boolean; } type URLChangeSubscriber = (trigger: URLChangeTrigger) => void; interface PatchedHistory extends History { __mazeyUrlChangePatched__?: boolean; __mazeyUrlChangeSubscribers__?: Set; __mazeyRawPushState__?: History["pushState"]; __mazeyRawReplaceState__?: History["replaceState"]; } export type { AnyFunction, BrowserInfo, DebounceFunc, DefineListeners, IsNumberOptions, LoadScriptReturns, MazeyDate, MazeyElement, MazeyFn, MazeyFnParams, MazeyFnReturn, MazeyFunction, MazeyObject, MazeyWindow, MultiValueUrlParams, OnURLChangeOptions, PatchedHistory, PreferenceResult, RepeatUntilOptions, SimpleObject, SimpleType, SingleValueUrlParams, TestUa, TestVs, ThrottleFunc, URLChangeInfo, URLChangeSubscriber, URLChangeTrigger, WebPerformance, ZResIsValidResOptions, ZResResponse };