Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create type definition #19

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { ConstructorOptions } from "logdna";
import Transport from "winston-transport";

declare class LogDNATransport extends Transport {
constructor(options: LogDNATransport.TransportOptions);
}

declare namespace LogDNATransport {
interface TransportOptions
extends Transport.TransportStreamOptions,
ConstructorOptions {
/** The LogDNA API key. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like there is some kinda indentation issue here - can you fix?

key: string;
/** The name of this transport (default: "LogDNA"). */
name?: string;
/** Level of messages that this transport should log (default: "debug"). */
level?: string;
/**
* Allow meta objects to be passed with each line (default: false).
* See logger ConstructorOptions for more information.
*/
index_meta?: boolean;
}
smusali marked this conversation as resolved.
Show resolved Hide resolved
}

export = LogDNATransport;