mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
I submitted a patch previously that added the `raw` function but I neglected to export the `RawConfig` class, which is what's actually returned from that `raw` function. My apologies for not getting this right the first time. Here is the implementation file that shows the `RawConfig` class and its `resolve()` method: https://github.com/lorenwest/node-config/blob/master/raw.js
11 lines
429 B
TypeScript
11 lines
429 B
TypeScript
/* The raw function returns an object as-is instead of passing it through processes that will make the object immutable.
|
|
* See: https://github.com/lorenwest/node-config/wiki/Special-features-for-JavaScript-configuration-files#using-promises-processstdout-and-other-objects-in-javascript-config-files
|
|
*/
|
|
|
|
export class RawConfig<T> {
|
|
constructor(rawObj: T);
|
|
resolve(): T;
|
|
}
|
|
|
|
export function raw<T>(obj: T): RawConfig<T>;
|