Options.d.ts 1.2 KB

1234567891011121314151617181920212223
  1. export declare function isObject(obj: any): boolean;
  2. export declare type OptionList = {
  3. [name: string]: any;
  4. };
  5. export declare const APPEND = "[+]";
  6. export declare const REMOVE = "[-]";
  7. export declare const OPTIONS: {
  8. invalidOption: "warn" | "fatal";
  9. optionError: (message: string, _key: string) => void;
  10. };
  11. export declare class Expandable {
  12. }
  13. export declare function expandable(def: OptionList): any;
  14. export declare function makeArray(x: any): any[];
  15. export declare function keys(def: OptionList): (string | symbol)[];
  16. export declare function copy(def: OptionList): OptionList;
  17. export declare function insert(dst: OptionList, src: OptionList, warn?: boolean): OptionList;
  18. export declare function defaultOptions(options: OptionList, ...defs: OptionList[]): OptionList;
  19. export declare function userOptions(options: OptionList, ...defs: OptionList[]): OptionList;
  20. export declare function selectOptions(options: OptionList, ...keys: string[]): OptionList;
  21. export declare function selectOptionsFromKeys(options: OptionList, object: OptionList): OptionList;
  22. export declare function separateOptions(options: OptionList, ...objects: OptionList[]): OptionList[];
  23. export declare function lookup(name: string, lookup: OptionList, def?: any): any;