UNPKG

940 BTypeScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7/// <reference types="node" />
8import type { Config } from '@jest/types';
9import type { JestHookSubscriber, UpdateConfigCallback, UsageData, WatchPlugin } from './types';
10declare abstract class BaseWatchPlugin implements WatchPlugin {
11 protected _stdin: NodeJS.ReadStream;
12 protected _stdout: NodeJS.WriteStream;
13 constructor({ stdin, stdout, }: {
14 stdin: NodeJS.ReadStream;
15 stdout: NodeJS.WriteStream;
16 });
17 apply(_hooks: JestHookSubscriber): void;
18 getUsageInfo(_globalConfig: Config.GlobalConfig): UsageData | null;
19 onKey(_key: string): void;
20 run(_globalConfig: Config.GlobalConfig, _updateConfigAndRun: UpdateConfigCallback): Promise<void | boolean>;
21}
22export default BaseWatchPlugin;