diff --git a/packages/jest-haste-map/src/index.ts b/packages/jest-haste-map/src/index.ts index 1b09664adb8b..b5c9b7ad6c17 100644 --- a/packages/jest-haste-map/src/index.ts +++ b/packages/jest-haste-map/src/index.ts @@ -42,7 +42,7 @@ import type { SerializableModuleMap, WorkerMetadata, } from './types'; -import FSEventsWatcher = require('./watchers/FSEventsWatcher'); +import {FSEventsWatcher} from './watchers/FSEventsWatcher'; // @ts-expect-error: not converted to TypeScript - it's a fork: https://github.com/facebook/jest/pull/10919 import NodeWatcher from './watchers/NodeWatcher'; // @ts-expect-error: not converted to TypeScript - it's a fork: https://github.com/facebook/jest/pull/5387 diff --git a/packages/jest-haste-map/src/watchers/FSEventsWatcher.ts b/packages/jest-haste-map/src/watchers/FSEventsWatcher.ts index 835ce4a45854..6d3f78b7c3c3 100644 --- a/packages/jest-haste-map/src/watchers/FSEventsWatcher.ts +++ b/packages/jest-haste-map/src/watchers/FSEventsWatcher.ts @@ -40,7 +40,7 @@ type FsEventsWatcherEvent = * Export `FSEventsWatcher` class. * Watches `dir`. */ -class FSEventsWatcher extends EventEmitter { +export class FSEventsWatcher extends EventEmitter { public readonly root: string; public readonly ignored?: Matcher; public readonly glob: Array; @@ -187,5 +187,3 @@ class FSEventsWatcher extends EventEmitter { this.emit(ALL_EVENT, type, file, this.root, stat); } } - -export = FSEventsWatcher;