/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict-local * @format */ import type { Task } from "./types"; import type { ExecaPromise, Options as ExecaOptions } from "execa"; /** * Removes the contents of a directory matching a given pattern, but keeps the directory. * @private */ declare export function deleteDirectoryContents( directory: string, filePattern: RegExp ): () => Promise; /** * Removes a directory recursively. * @private */ declare export function deleteDirectory(directory: string): () => Promise; /** * Deletes the contents of the tmp directory matching a given pattern. * @private */ declare export function deleteTmpDirectoryContents( filepattern: RegExp ): () => Promise; type CocoaPodsClean = { clean: Task, }; type AndroidClean = { validate: Task, run: Task, }; type MetroClean = { metro: Task>, haste: Task>, react_native: Task>, }; type NpmClean = { node_modules: Task>, verify_cache: Task, }; type WatchmanClean = { stop: Task, cache: Task, }; type YarnClean = { clean: Task, }; type CleanTasks = { android: (andoirdSrcDir: ?string, opts?: ExecaOptions) => AndroidClean, cocoapods: CocoaPodsClean, metro: () => MetroClean, npm: (projectRootDir: string) => NpmClean, watchman: (projectRootDir: string) => WatchmanClean, yarn: (projectRootDir: string) => YarnClean, cocoapods?: (projectRootDir: string) => CocoaPodsClean, }; // The tasks that cleanup various build artefacts. /* eslint sort-keys: "off" */ declare export const tasks: CleanTasks;