Ignore:
Timestamp:
01/21/25 03:08:24 (3 days ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
0c6b92a
Message:

F4 Finalna Verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/chokidar/index.d.ts

    r0c6b92a r79a0317  
     1/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
    12import { Stats } from 'fs';
    23import { EventEmitter } from 'events';
    34import { ReaddirpStream, ReaddirpOptions, EntryInfo } from 'readdirp';
    4 import { NodeFsHandler, EventName, Path } from './handler.js';
     5import { NodeFsHandler, EventName, Path, EVENTS as EV, WatchHandlers } from './handler.js';
    56type AWF = {
    67    stabilityThreshold: number;
     
    3435};
    3536export type ThrottleType = 'readdir' | 'watch' | 'add' | 'remove' | 'change';
    36 export type EmitArgs = [EventName, Path | Error, any?, any?, any?];
     37export type EmitArgs = [path: Path, stats?: Stats];
     38export type EmitErrorArgs = [error: Error, stats?: Stats];
     39export type EmitArgsWithName = [event: EventName, ...EmitArgs];
    3740export type MatchFunction = (val: string, stats?: Stats) => boolean;
    3841export interface MatcherObject {
     
    6871    filterDir(entry: EntryInfo): boolean;
    6972}
     73export interface FSWatcherKnownEventMap {
     74    [EV.READY]: [];
     75    [EV.RAW]: Parameters<WatchHandlers['rawEmitter']>;
     76    [EV.ERROR]: Parameters<WatchHandlers['errHandler']>;
     77    [EV.ALL]: [event: EventName, ...EmitArgs];
     78}
     79export type FSWatcherEventMap = FSWatcherKnownEventMap & {
     80    [k in Exclude<EventName, keyof FSWatcherKnownEventMap>]: EmitArgs;
     81};
    7082/**
    7183 * Watches files & directories for changes. Emitted events:
     
    7688 *       .on('add', path => log('File', path, 'was added'))
    7789 */
    78 export declare class FSWatcher extends EventEmitter {
     90export declare class FSWatcher extends EventEmitter<FSWatcherEventMap> {
    7991    closed: boolean;
    8092    options: FSWInstanceOptions;
     
    8698    _watched: Map<string, DirEntry>;
    8799    _pendingWrites: Map<string, any>;
    88     _pendingUnlinks: Map<string, EmitArgs>;
     100    _pendingUnlinks: Map<string, EmitArgsWithName>;
    89101    _readyCount: number;
    90102    _emitReady: () => void;
     
    92104    _userIgnored?: MatchFunction;
    93105    _readyEmitted: boolean;
    94     _emitRaw: () => void;
     106    _emitRaw: WatchHandlers['rawEmitter'];
    95107    _boundRemove: (dir: string, item: string) => void;
    96108    _nodeFsHandler: NodeFsHandler;
     
    202214};
    203215export default _default;
    204 //# sourceMappingURL=index.d.ts.map
Note: See TracChangeset for help on using the changeset viewer.