devstar插件
This commit is contained in:
8
node_modules/search-insights/dist/utils/extractAdditionalParams.d.ts
generated
vendored
Normal file
8
node_modules/search-insights/dist/utils/extractAdditionalParams.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { InsightsAdditionalEventParams } from "../types";
|
||||
export type WithAdditionalParams<TEventType> = InsightsAdditionalEventParams | TEventType;
|
||||
export declare function extractAdditionalParams<TEventType extends {
|
||||
index: string;
|
||||
}>(params: Array<InsightsAdditionalEventParams | TEventType>): {
|
||||
events: TEventType[];
|
||||
additionalParams?: InsightsAdditionalEventParams;
|
||||
};
|
5
node_modules/search-insights/dist/utils/featureDetection.d.ts
generated
vendored
Normal file
5
node_modules/search-insights/dist/utils/featureDetection.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const supportsCookies: () => boolean;
|
||||
export declare const supportsSendBeacon: () => boolean;
|
||||
export declare const supportsXMLHttpRequest: () => boolean;
|
||||
export declare const supportsNodeHttpModule: () => boolean;
|
||||
export declare const supportsNativeFetch: () => boolean;
|
2
node_modules/search-insights/dist/utils/getRequesterForBrowser.d.ts
generated
vendored
Normal file
2
node_modules/search-insights/dist/utils/getRequesterForBrowser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { RequestFnType } from "./request";
|
||||
export declare function getRequesterForBrowser(): RequestFnType;
|
2
node_modules/search-insights/dist/utils/getRequesterForNode.d.ts
generated
vendored
Normal file
2
node_modules/search-insights/dist/utils/getRequesterForNode.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { RequestFnType } from "./request";
|
||||
export declare function getRequesterForNode(): RequestFnType;
|
8
node_modules/search-insights/dist/utils/index.d.ts
generated
vendored
Normal file
8
node_modules/search-insights/dist/utils/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export declare const isUndefined: (value: any) => value is undefined;
|
||||
export declare const isString: (value: any) => value is string;
|
||||
export declare const isNumber: (value: any) => value is number;
|
||||
export declare const isFunction: (value: any) => value is Function;
|
||||
export declare const isPromise: <T>(value: T | Promise<T>) => value is Promise<T>;
|
||||
export * from "./extractAdditionalParams";
|
||||
export * from "./featureDetection";
|
||||
export * from "./objectQueryTracker";
|
28
node_modules/search-insights/dist/utils/localStorage.d.ts
generated
vendored
Normal file
28
node_modules/search-insights/dist/utils/localStorage.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* A utility class for safely interacting with localStorage.
|
||||
*/
|
||||
export declare class LocalStorage {
|
||||
static store: Storage | undefined;
|
||||
/**
|
||||
* Safely get a value from localStorage.
|
||||
* If the value is not able to be parsed as JSON, this method will return null.
|
||||
*
|
||||
* @param key - String value of the key.
|
||||
* @returns Null if the key is not found or unable to be parsed, the value otherwise.
|
||||
*/
|
||||
static get<T>(key: string): T | null;
|
||||
/**
|
||||
* Safely set a value in localStorage.
|
||||
* If the storage is full, this method will catch the error and log a warning.
|
||||
*
|
||||
* @param key - String value of the key.
|
||||
* @param value - Any value to store.
|
||||
*/
|
||||
static set(key: string, value: any): void;
|
||||
/**
|
||||
* Remove a value from localStorage.
|
||||
*
|
||||
* @param key - String value of the key.
|
||||
*/
|
||||
static remove(key: string): void;
|
||||
}
|
3
node_modules/search-insights/dist/utils/objectQueryTracker.d.ts
generated
vendored
Normal file
3
node_modules/search-insights/dist/utils/objectQueryTracker.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare function storeQueryForObject(index: string, objectID: string, queryID: string): void;
|
||||
export declare function getQueryForObject(index: string, objectID: string): [queryId: string, timestamp: number] | undefined;
|
||||
export declare function removeQueryForObjects(index: string, objectIDs: string[]): void;
|
5
node_modules/search-insights/dist/utils/request.d.ts
generated
vendored
Normal file
5
node_modules/search-insights/dist/utils/request.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export type RequestFnType = (url: string, data: Record<string, unknown>) => Promise<boolean>;
|
||||
export declare const requestWithXMLHttpRequest: RequestFnType;
|
||||
export declare const requestWithSendBeacon: RequestFnType;
|
||||
export declare const requestWithNodeHttpModule: RequestFnType;
|
||||
export declare const requestWithNativeFetch: RequestFnType;
|
7
node_modules/search-insights/dist/utils/uuid.d.ts
generated
vendored
Normal file
7
node_modules/search-insights/dist/utils/uuid.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Create UUID according to
|
||||
* https://www.ietf.org/rfc/rfc4122.txt.
|
||||
*
|
||||
* @returns Generated UUID.
|
||||
*/
|
||||
export declare function createUUID(): string;
|
Reference in New Issue
Block a user