metro/flow-typed/debug.js.flow

42 lines
1.7 KiB
Plaintext
Raw Normal View History

/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @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;
}