question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Types definitions needed

See original GitHub issue

I’m trying to use winston-daily-rotate-file with typescript, I just noticed types declarations are not available at types/winston-daily-rotate-file

I’m new to typescript, can someone write a proper types declarations for this?

For now I have added some simple types declarations and everything seems to be working fine. I’m sharing it in case anyone is looking for it.

declare module 'winston-daily-rotate-file' {
  import { DailyRotateFileTransportInstance } from 'winston';
  let DailyRotateFile: DailyRotateFileTransportInstance;
  export = DailyRotateFile;
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
hallsbyracommented, Oct 23, 2018

@samueltlg , I do it like this:

import { createLogger } from "winston";
import * as DailyRotateFile from "winston-daily-rotate-file";

const log = createLogger({
    transports: [
        new DailyRotateFile({
            filename: "log/output-%DATE%.log",
            datePattern: "YYYY-MM-DD",
        })
    ]
});
2reactions
mattberthercommented, Jul 12, 2018

Thank you @Slessi. Merged #163 and published to npm as winston-daily-rotate-file@3.3.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Various Types of Definitions - UCF Mapper
There are specific types of definition forms we'll cover in a minute. But first we need to start with the most used forms...
Read more >
Identifying Types of Definitions - The NROC Project
All definitions attempt to explain or clarify a term. This lesson will introduce you to the three different types of definitions: formal, informal,...
Read more >
Definition Types — Larry Fike
Here are just four among the many types of definitions: (1) Definition by synonym; (2) Ostensive definitions; (3) Stipulative definitions, and. (4) Analytical...
Read more >
Types of Definitions Used in Technical Writing - Study.com
There are three types of definitions commonly used in technical writing: Parenthetical definitions, which are words that quickly explain a term ...
Read more >
Kinds and Types of Definitions - A Research Guide for Students
Wikipedia defines definition as “the meaning of a word, phrase or other term” Definitions can be categorized into to specific classifications: Intensional ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found