CoolFace
Apppublic

opusdev/vector-similarity-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
index.d.ts63 linesDownload Raw Back to lib
1import { URL } from 'whatwg-url';2import { redactConnectionString, ConnectionStringRedactionOptions } from './redact';3export { redactConnectionString, ConnectionStringRedactionOptions };4declare class CaseInsensitiveMap<K extends string = string> extends Map<K, string> {5    delete(name: K): boolean;6    get(name: K): string | undefined;7    has(name: K): boolean;8    set(name: K, value: any): this;9    _normalizeKey(name: any): K;10}11declare abstract class URLWithoutHost extends URL {12    abstract get host(): never;13    abstract set host(value: never);14    abstract get hostname(): never;15    abstract set hostname(value: never);16    abstract get port(): never;17    abstract set port(value: never);18    abstract get href(): string;19    abstract set href(value: string);20}21export interface ConnectionStringParsingOptions {22    looseValidation?: boolean;23}24export declare class ConnectionString extends URLWithoutHost {25    _hosts: string[];26    constructor(uri: string, options?: ConnectionStringParsingOptions);27    get host(): never;28    set host(_ignored: never);29    get hostname(): never;30    set hostname(_ignored: never);31    get port(): never;32    set port(_ignored: never);33    get href(): string;34    set href(_ignored: string);35    get isSRV(): boolean;36    get hosts(): string[];37    set hosts(list: string[]);38    toString(): string;39    clone(): ConnectionString;40    redact(options?: ConnectionStringRedactionOptions): ConnectionString;41    typedSearchParams<T extends {}>(): {42        append(name: keyof T & string, value: any): void;43        delete(name: keyof T & string): void;44        get(name: keyof T & string): string | null;45        getAll(name: keyof T & string): string[];46        has(name: keyof T & string): boolean;47        set(name: keyof T & string, value: any): void;48        keys(): IterableIterator<keyof T & string>;49        values(): IterableIterator<string>;50        entries(): IterableIterator<[keyof T & string, string]>;51        _normalizeKey(name: keyof T & string): string;52        [Symbol.iterator](): IterableIterator<[keyof T & string, string]>;53        sort(): void;54        forEach<THIS_ARG = void>(callback: (this: THIS_ARG, value: string, name: string, searchParams: any) => void, thisArg?: THIS_ARG | undefined): void;55        readonly [Symbol.toStringTag]: "URLSearchParams";56    };57}58export declare class CommaAndColonSeparatedRecord<K extends {} = Record<string, unknown>> extends CaseInsensitiveMap<keyof K & string> {59    constructor(from?: string | null);60    toString(): string;61}62export default ConnectionString;63