UNPKG

1.24 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at
5 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
6 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
7 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
8 * Google as part of the polymer project is also subject to an additional IP
9 * rights grant found at http://polymer.github.io/PATENTS.txt
10 */
11/// <reference types="node" />
12import { ExecFileOptions } from 'child_process';
13/** Return whether the given string is a valid HTTP URL. */
14export declare function isHttpUrl(str: string): boolean;
15export declare function fileKind(path: string): Promise<'file' | 'dir' | undefined>;
16export declare function runNpm(args: string[], options?: ExecFileOptions): Promise<string | Buffer>;
17/**
18 * Promisified version of setTimeout.
19 */
20export declare const wait: (ms: number) => Promise<unknown>;
21/**
22 * A function that should never be called. But if it somehow is anyway, throw an
23 * exception with the given message.
24 */
25export declare function throwUnreachable(_unreachable: never, message: string): void;