diff --git a/loggly/loggly-tests.ts b/loggly/loggly-tests.ts new file mode 100644 index 0000000000..bf022999fb --- /dev/null +++ b/loggly/loggly-tests.ts @@ -0,0 +1,12 @@ +/// +import loggly = require("loggly"); + +var options: loggly.LogglyOptions = { + token: "YOUR_TOKEN", + subdomain: "YOUR_DOMAIN", + tags: ["NodeJS"], + json: true +}; + +var client: loggly.Loggly = loggly.createClient(options) +client.log('hello world'); diff --git a/loggly/loggly-tests.ts.tscparams b/loggly/loggly-tests.ts.tscparams new file mode 100644 index 0000000000..5f84b97777 --- /dev/null +++ b/loggly/loggly-tests.ts.tscparams @@ -0,0 +1 @@ +--noImplicitAny --module commonjs --target es5 diff --git a/loggly/loggly.d.ts b/loggly/loggly.d.ts new file mode 100644 index 0000000000..40724f8558 --- /dev/null +++ b/loggly/loggly.d.ts @@ -0,0 +1,25 @@ +// Type definitions for loggly 1.0.8 +// Project: https://github.com/nodejitsu/node-loggly +// Definitions by: Ray Martone +// Definitions: https://github.com/borisyankov/DefinitelyTyped +declare module "loggly" { + + interface LogglyOptions { + token: string; + subdomain: string; + tags?: string[]; + json?: boolean; + host?: string; + auth?: { + username: string; + password: string; + } + } + + interface Loggly { + log(message: any, tags?: string[], callback?: (err: any, results: any) => void): void; + log(message: any, callback?: (err: any, results: any) => void): void; + } + + function createClient(options: LogglyOptions): Loggly; +}