Skip to content

Commit 3da2a86

Browse files
Add @throws for non-array inputs to All-variants of stateless module
1 parent a75620c commit 3da2a86

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/stateless.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export function escape(arg, options) {
5151
* @param {boolean} [options.flagProtection=true] Is flag protection enabled.
5252
* @param {boolean | string} [options.shell=true] The shell to escape for.
5353
* @returns {string[]} The escaped arguments.
54+
* @throws {TypeError} The arguments are not an array.
5455
* @throws {TypeError} One of the arguments is not stringable.
5556
* @throws {Error} The shell is not supported or could not be found.
5657
* @since 2.1.0
@@ -109,6 +110,7 @@ export function quote(arg, options) {
109110
* @param {boolean} [options.flagProtection=true] Is flag protection enabled.
110111
* @param {boolean | string} [options.shell=true] The shell to escape for.
111112
* @returns {string[]} The quoted and escaped arguments.
113+
* @throws {TypeError} The arguments are not an array.
112114
* @throws {TypeError} One of the arguments is not stringable.
113115
* @throws {Error} The shell is not supported or could not be found.
114116
* @throws {Error} Quoting is not supported with `shell: false`.

0 commit comments

Comments
 (0)