Skip to content

Commit

Permalink
Update index.d.ts (#1729)
Browse files Browse the repository at this point in the history
Hoist type defs from the logform module.

Currently there isn't a way to write correct type definitions for
when e.g creating a format since the types for such objects are
declared in `logform`.
This patch move logform type defs so that they can be used by
user code - For example by doing:

`import { Logform } from 'winston'; const f: Logform.Format;`
  • Loading branch information
iffyio authored and DABH committed Dec 2, 2019
1 parent 7bb258c commit 8944598
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Expand Up @@ -14,6 +14,7 @@ import * as Transports from './lib/winston/transports/index';
declare namespace winston {
// Hoisted namespaces from other modules
export import format = logform.format;
export import Logform = logform;
export import config = Config;
export import transports = Transports;

Expand Down

0 comments on commit 8944598

Please sign in to comment.