diff --git a/rcloader/rcloader-tests.ts b/rcloader/rcloader-tests.ts new file mode 100644 index 000000000..16ade8c55 --- /dev/null +++ b/rcloader/rcloader-tests.ts @@ -0,0 +1,11 @@ +/// + +import RcLoader = require("rcloader"); + +const rcLoader = new RcLoader(".configfilename", { + lookup: true +}); + +rcLoader.for("foo.json", (err, fileOpts) => { + // send the file along +}); diff --git a/rcloader/rcloader.d.ts b/rcloader/rcloader.d.ts new file mode 100644 index 000000000..b3805d0de --- /dev/null +++ b/rcloader/rcloader.d.ts @@ -0,0 +1,18 @@ +// Type definitions for rcloader +// Project: hhttps://github.com/spalger/rcloader +// Definitions by: Panu Horsmalahti +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "rcloader" { + interface Options { + [property: string]: any; + lookup?: boolean; + } + + class RcLoader { + constructor(configfilename: string, options: string | Options); + for(path: string, callback?: (error: any, fileOpts: any) => void): void; + } + + export = RcLoader; +}