mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
adding def for loggly
This commit is contained in:
parent
0c2ee8583c
commit
609b043687
12
loggly/loggly-tests.ts
Normal file
12
loggly/loggly-tests.ts
Normal file
@ -0,0 +1,12 @@
|
||||
/// <reference path='./loggly.d.ts' />
|
||||
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');
|
||||
1
loggly/loggly-tests.ts.tscparams
Normal file
1
loggly/loggly-tests.ts.tscparams
Normal file
@ -0,0 +1 @@
|
||||
--noImplicitAny --module commonjs --target es5
|
||||
25
loggly/loggly.d.ts
vendored
Normal file
25
loggly/loggly.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
// Type definitions for loggly 1.0.8
|
||||
// Project: https://github.com/nodejitsu/node-loggly
|
||||
// Definitions by: Ray Martone <https://github.com/rmartone>
|
||||
// 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;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user