<commit_before>﻿declare module 'localsocket' {
  export default socket;

  export function socket<T extends LocalSocketObject>(name: string, storage: IDBFactory, config: LocalSocketConfig<T>): LocalSocket<T>;
  export interface LocalSocket<T extends LocalSocketObject> {
    link(key: string): T;
    delete(key: string): void;
    keys(cb: (keys: string[], error: DOMError) => any): void;
    recent(limit: number, cb: (keys: string[], error: DOMError) => any): void;
    destroy(): void;
  }
  export function socket<T extends LocalSocketObject>(name: string, storage: Storage, config: LocalSocketConfig<T>): LocalStore<T>;
  export interface LocalStore<T extends LocalSocketObject> {
    link(): T;
    destroy(): void;
  }

  export interface LocalSocketObject {
    __id?: number;
    __key?: string;
    __event?: IObservableObserver<LocalSocketEventType, LocalSocketEvent, any>;
  }
  export interface LocalSocketConfig<T> {
    life?: number;
    factory(): T;
    destroy?(error: DOMError, event: Event): boolean;
  }
  export type LocalSocketEventType
    = 'send'
    | 'recv';
  export interface LocalSocketEvent {
    type: LocalSocketEventType;
    key: string;<commit_msg>chore(comment): add comments into the declaration file<commit_after>﻿declare module 'localsocket' {
  export default socket;

  export function socket<T extends LocalSocketObject>(name: string, storage: IDBFactory, config: LocalSocketConfig<T>): LocalSocket<T>;
  export interface LocalSocket<T extends LocalSocketObject> {
    link(key: string): T;
    delete(key: string): void;
    keys(cb: (keys: string[], error: DOMError) => any): void;
    recent(limit: number, cb: (keys: string[], error: DOMError) => any): void;
    destroy(): void;
  }
  export function socket<T extends LocalSocketObject>(name: string, storage: Storage, config: LocalSocketConfig<T>): LocalStore<T>;
  export interface LocalStore<T extends LocalSocketObject> {
    link(): T;
    destroy(): void;
  }

  export interface LocalSocketObject {
    __id?: number;
    __key?: string;
    __event?: IObservableObserver<LocalSocketEventType, LocalSocketEvent, any>;
  }
  export interface LocalSocketConfig<T> {
    life?: number; // WebStorage only
    factory(): T;
    destroy?(error: DOMError, event: Event): boolean;
  }
  export type LocalSocketEventType
    = 'send'
    | 'recv';
  export interface LocalSocketEvent {
    type: LocalSocketEventType;
    key: string;
{'fraction_non_alphanumeric': 0.12037797863599015, 'fraction_numerical': 0.0, 'mean_word_length': 4.636574074074074, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3710394', 'n_tokens_mistral': 703, 'n_tokens_neox': 701, 'n_words': 209}