diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..e523385 --- /dev/null +++ b/index.d.ts @@ -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. */ + 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; + } +} + +export = LogDNATransport;