Home / File/ chokidar.d.ts — vite Source File

chokidar.d.ts — vite Source File

Architecture documentation for chokidar.d.ts, a typescript file in the vite codebase. 3 imports, 0 dependents.

File typescript HMRClient HotRuntime 3 imports 1 classes

Entity Profile

Dependency Diagram

graph LR
  f279c802_1870_ac62_8d1a_1bc76a30dc8e["chokidar.d.ts"]
  9db0a7f9_3dde_18bc_c0b6_2b7dd1b7dd1f["./anymatch"]
  f279c802_1870_ac62_8d1a_1bc76a30dc8e --> 9db0a7f9_3dde_18bc_c0b6_2b7dd1b7dd1f
  e6032fbc_44cf_58d6_868d_dd15106c18c5["node:fs"]
  f279c802_1870_ac62_8d1a_1bc76a30dc8e --> e6032fbc_44cf_58d6_868d_dd15106c18c5
  d55a9cec_90e1_f4ad_d084_e5cf07bdef40["node:events"]
  f279c802_1870_ac62_8d1a_1bc76a30dc8e --> d55a9cec_90e1_f4ad_d084_e5cf07bdef40
  style f279c802_1870_ac62_8d1a_1bc76a30dc8e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// Inlined to avoid extra dependency (chokidar is bundled in the published build)

// https://github.com/paulmillr/chokidar/blob/3.6.0/types/index.d.ts
// MIT Licensed https://github.com/paulmillr/chokidar/blob/3.6.0/LICENSE

/// <reference types="node" />

import type * as fs from 'node:fs'
import { EventEmitter } from 'node:events'
import type { Matcher } from './anymatch'

export class FSWatcher extends EventEmitter implements fs.FSWatcher {
  options: WatchOptions

  /**
   * Constructs a new FSWatcher instance with optional WatchOptions parameter.
   */
  constructor(options?: WatchOptions)

  /**
   * When called, requests that the Node.js event loop not exit so long as the fs.FSWatcher is active.
   * Calling watcher.ref() multiple times will have no effect.
   */
  ref(): this

  /**
   * When called, the active fs.FSWatcher object will not require the Node.js event loop to remain active.
   * If there is no other activity keeping the event loop running, the process may exit before the fs.FSWatcher object's callback is invoked.
   * Calling watcher.unref() multiple times will have no effect.
   */
  unref(): this

  /**
   * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
   * string.
   */
  add(paths: string | ReadonlyArray<string>): this

  /**
   * Stop watching files, directories, or glob patterns. Takes an array of strings or just one
   * string.
   */
  unwatch(paths: string | ReadonlyArray<string>): this

  /**
   * Returns an object representing all the paths on the file system being watched by this
   * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless
   * the `cwd` option was used), and the values are arrays of the names of the items contained in
   * each directory.
   */
  getWatched(): {
    [directory: string]: string[]
  }

  /**
   * Removes all listeners from watched files.
   */
  close(): Promise<void>

  on(
// ... (160 more lines)

Domain

Subdomains

Classes

Dependencies

  • ./anymatch
  • node:events
  • node:fs

Frequently Asked Questions

What does chokidar.d.ts do?
chokidar.d.ts is a source file in the vite codebase, written in typescript. It belongs to the HMRClient domain, HotRuntime subdomain.
What does chokidar.d.ts depend on?
chokidar.d.ts imports 3 module(s): ./anymatch, node:events, node:fs.
Where is chokidar.d.ts in the architecture?
chokidar.d.ts is located at packages/vite/src/types/chokidar.d.ts (domain: HMRClient, subdomain: HotRuntime, directory: packages/vite/src/types).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free