2018-01-12 10:50:44 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2018-01-12 10:50:44 +00:00
|
|
|
*
|
|
|
|
* @flow
|
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
|
|
|
|
// https://github.com/visionmedia/debug
|
|
|
|
// https://www.npmjs.com/package/debug
|
|
|
|
|
|
|
|
declare module 'debug' {
|
|
|
|
//declare export default (string) => (?mixed, ?mixed) => void
|
|
|
|
// declare export default (namespace: string) => void
|
|
|
|
// note: this is NOT a default export! There is no default property.
|
|
|
|
declare module.exports: (namespace: string) => (...Array<mixed>) => void;
|
|
|
|
|
|
|
|
// Unable to type the remaining API:
|
|
|
|
// "Found both `declare module.exports` and `declare export` in
|
|
|
|
// the same module. Modules can only have 1 since they are either
|
|
|
|
// an ES module xor they are a CommonJS module."
|
|
|
|
// And you can't call a union type so let's ignore the rest of the API.
|
|
|
|
// Note that we only use the main debug export anyways.
|
|
|
|
|
|
|
|
// declare export function coerce(mixed): void;
|
|
|
|
// declare export var colors: Array<number>;
|
|
|
|
// declare export function disable(namespace: string): void;
|
|
|
|
// declare export function enable(namespace: string): void;
|
|
|
|
// declare export function enabled(namespace: string): boolean;
|
|
|
|
// declare export function formatArgs(mixed): mixed;
|
|
|
|
// declare export var formatters: Array<(mixed) => void>;
|
|
|
|
// declare export function humanize(mixed): string;
|
|
|
|
// declare export function load(): string;
|
|
|
|
// declare export function log(mixed): void;
|
|
|
|
// declare export var names: Array<string>;
|
|
|
|
// declare export function save(namespaces: string): void;
|
|
|
|
// declare export var skips: Array<RegExp>;
|
|
|
|
// declare export function useColors(): boolean;
|
|
|
|
}
|