mirror of https://github.com/status-im/metro.git
44 lines
1.8 KiB
Plaintext
44 lines
1.8 KiB
Plaintext
|
/**
|
||
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||
|
* All rights reserved.
|
||
|
*
|
||
|
* This source code is licensed under the BSD-style license found in the
|
||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||
|
*
|
||
|
* @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;
|
||
|
}
|