import * as child_process from 'child_process'; import { SpawnOptions } from 'child_process'; import { TextDocument } from 'vscode-languageserver-textdocument'; import { Range } from 'vscode-languageserver-types'; declare function fileExists(filePath: string): Promise; declare const asyncExec: typeof child_process.exec.__promisify__; declare function validatePlaybookPath(fsPath: string): string | undefined; type SpawnResult = { stdout: string; stderr: string; }; declare function spawnSyncWithResult(command: string, args: string[], options?: child_process.SpawnSyncOptions): SpawnResult; declare function asyncSpawn(command: string, args: string[], options?: SpawnOptions): Promise; declare function toLspRange(range: [number, number], textDocument: TextDocument): Range; declare function hasOwnProperty(obj: X, prop: Y): obj is X & Record; /** * Checks whether `obj` is a non-null object. */ declare function isObject(obj: X): obj is X & Record; declare function insert(str: string, index: number, val: string): string; /** * Adjusts the command and environment in case the interpreter path is provided. */ declare function withInterpreter(executable: string, args: string, interpreterPath: string, activationScript: string, _isVenvDirectory?: (binDir: string) => boolean): { command: string; env: NodeJS.ProcessEnv; }; /** * Returns errors messages when LS is run on unsupported platform, or undefined * when all is fine. */ declare function getUnsupportedError(): string | undefined; export { asyncExec, asyncSpawn, fileExists, getUnsupportedError, hasOwnProperty, insert, isObject, spawnSyncWithResult, toLspRange, validatePlaybookPath, withInterpreter };