UNPKG

@nodesecure/js-x-ray

Version:
29 lines 1.05 kB
import { type SourceArrayLocation } from "./utils/toArrayLocation.ts"; export type Type = "url" | "hostname" | "ip" | "email" | "dependency" | (string & {}); export type Location<T = Record<string, unknown>> = { file: string | null; location: SourceArrayLocation[]; metadata?: T; }; export type CollectableInfos<T = Record<string, unknown>> = { file?: string | null; metadata?: T; location: SourceArrayLocation; }; export interface CollectableSet<T = Record<string, unknown>> { add(value: string, infos: CollectableInfos<T>): void; type: Type; values(): Iterable<string>; } export declare class DefaultCollectableSet<T = Record<string, unknown>> implements CollectableSet<T> { #private; type: Type; constructor(type: string); add(value: string, { file, location, metadata }: CollectableInfos<T>): void; values(): Iterable<string>; [Symbol.iterator](): Generator<{ value: string; locations: Location<T>[]; }, void, unknown>; } //# sourceMappingURL=CollectableSet.d.ts.map