版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
1006 B

  1. type RC = Record<string, any>;
  2. interface RCOptions {
  3. name?: string;
  4. dir?: string;
  5. flat?: boolean;
  6. }
  7. declare const defaults: RCOptions;
  8. declare function parse<T extends RC = RC>(contents: string, options?: RCOptions): T;
  9. declare function parseFile<T extends RC = RC>(path: string, options?: RCOptions): T;
  10. declare function read<T extends RC = RC>(options?: RCOptions | string): T;
  11. declare function readUser<T extends RC = RC>(options?: RCOptions | string): T;
  12. declare function serialize<T extends RC = RC>(config: T): string;
  13. declare function write<T extends RC = RC>(config: T, options?: RCOptions | string): void;
  14. declare function writeUser<T extends RC = RC>(config: T, options?: RCOptions | string): void;
  15. declare function update<T extends RC = RC>(config: T, options?: RCOptions | string): T;
  16. declare function updateUser<T extends RC = RC>(config: T, options?: RCOptions | string): T;
  17. export { defaults, parse, parseFile, read, readUser, serialize, update, updateUser, write, writeUser };