Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

index.d.ts 3.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // Type definitions for minimist 1.2
  2. // Project: https://github.com/substack/minimist
  3. // Definitions by: Bart van der Schoor <https://github.com/Bartvds>
  4. // Necroskillz <https://github.com/Necroskillz>
  5. // kamranayub <https://github.com/kamranayub>
  6. // Piotr Błażejewicz <https://github.com/peterblazejewicz>
  7. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
  8. /**
  9. * Return an argument object populated with the array arguments from args
  10. *
  11. * @param [args] An optional argument array (typically `process.argv.slice(2)`)
  12. * @param [opts] An optional options object to customize the parsing
  13. */
  14. declare function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs;
  15. /**
  16. * Return an argument object populated with the array arguments from args. Strongly-typed
  17. * to be the intersect of type T with minimist.ParsedArgs.
  18. *
  19. * `T` The type that will be intersected with minimist.ParsedArgs to represent the argument object
  20. *
  21. * @param [args] An optional argument array (typically `process.argv.slice(2)`)
  22. * @param [opts] An optional options object to customize the parsing
  23. */
  24. declare function minimist<T>(args?: string[], opts?: minimist.Opts): T & minimist.ParsedArgs;
  25. /**
  26. * Return an argument object populated with the array arguments from args. Strongly-typed
  27. * to be the the type T which should extend minimist.ParsedArgs
  28. *
  29. * `T` The type that extends minimist.ParsedArgs and represents the argument object
  30. *
  31. * @param [args] An optional argument array (typically `process.argv.slice(2)`)
  32. * @param [opts] An optional options object to customize the parsing
  33. */
  34. declare function minimist<T extends minimist.ParsedArgs>(args?: string[], opts?: minimist.Opts): T;
  35. declare namespace minimist {
  36. interface Opts {
  37. /**
  38. * A string or array of strings argument names to always treat as strings
  39. */
  40. string?: string | string[];
  41. /**
  42. * A boolean, string or array of strings to always treat as booleans. If true will treat
  43. * all double hyphenated arguments without equals signs as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
  44. */
  45. boolean?: boolean | string | string[];
  46. /**
  47. * An object mapping string names to strings or arrays of string argument names to use as aliases
  48. */
  49. alias?: { [key: string]: string | string[] };
  50. /**
  51. * An object mapping string argument names to default values
  52. */
  53. default?: { [key: string]: any };
  54. /**
  55. * When true, populate argv._ with everything after the first non-option
  56. */
  57. stopEarly?: boolean;
  58. /**
  59. * A function which is invoked with a command line parameter not defined in the opts
  60. * configuration object. If the function returns false, the unknown option is not added to argv
  61. */
  62. unknown?: (arg: string) => boolean;
  63. /**
  64. * When true, populate argv._ with everything before the -- and argv['--'] with everything after the --.
  65. * Note that with -- set, parsing for arguments still stops after the `--`.
  66. */
  67. '--'?: boolean;
  68. }
  69. interface ParsedArgs {
  70. [arg: string]: any;
  71. /**
  72. * If opts['--'] is true, populated with everything after the --
  73. */
  74. '--'?: string[];
  75. /**
  76. * Contains all the arguments that didn't have an option associated with them
  77. */
  78. _: string[];
  79. }
  80. }
  81. export = minimist;