Typescriptify the main process code (12/N)

Summary: Converted static/watchman.js to typescript

Reviewed By: passy

Differential Revision: D20071220

fbshipit-source-id: 7d86ffa8dd728246eeac8a01e2573564e8fd6bbe
This commit is contained in:
Anton Nikolaev
2020-02-27 05:28:02 -08:00
committed by Facebook Github Bot
parent aff433c8ad
commit 8d66c3aba7
3 changed files with 40 additions and 37 deletions

View File

@@ -16,7 +16,7 @@ import recursiveReaddir from 'recursive-readdir';
import expandTilde from 'expand-tilde';
import pMap from 'p-map';
import {homedir} from 'os';
const Watchman = require('./watchman');
import Watchman from './watchman';
const HOME_DIR = homedir();
@@ -87,7 +87,7 @@ async function startWatchingPluginsUsingWatchman(
onPluginChanged: (plugin: PluginInfo) => void,
) {
// Initializing a watchman for each folder containing plugins
const watchmanRootMap: {[key: string]: any} = {};
const watchmanRootMap: {[key: string]: Watchman} = {};
await Promise.all(
plugins.map(async plugin => {
const watchmanRoot = path.resolve(plugin.rootDir, '..');