mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Add type definitions for rcloader.
This commit is contained in:
11
rcloader/rcloader-tests.ts
Normal file
11
rcloader/rcloader-tests.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/// <reference path="./rcloader.d.ts" />
|
||||
|
||||
import rcloader = require("rcloader");
|
||||
|
||||
const rcLoader = new rcloader.RcLoader(".configfilename", {
|
||||
lookup: true
|
||||
});
|
||||
|
||||
rcLoader.for("foo.json", (err, fileOpts) => {
|
||||
// send the file along
|
||||
});
|
||||
16
rcloader/rcloader.d.ts
vendored
Normal file
16
rcloader/rcloader.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Type definitions for rcloader
|
||||
// Project: hhttps://github.com/spalger/rcloader
|
||||
// Definitions by: Panu Horsmalahti <https://github.com/panuhorsmalahti>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "rcloader" {
|
||||
interface Options {
|
||||
[property: string]: any;
|
||||
lookup?: boolean;
|
||||
}
|
||||
|
||||
export class RcLoader {
|
||||
constructor(configfilename: string, options: string | Options);
|
||||
for(path: string, callback?: (error: any, fileOpts: any) => void): void;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user