Skip to content

Commit 6e19299

Browse files
committed
define throws in multipart boundary setter doc comment
1 parent 919496d commit 6e19299

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Multipart.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,17 @@ export class Multipart implements Part {
113113
}
114114

115115
/**
116-
* The boundary bytes used to separate the parts
116+
* Get the boundary bytes used to separate the parts
117117
*/
118118
public get boundary(): Uint8Array {
119119
return this.#boundary;
120120
}
121121

122+
/**
123+
* Set the boundary bytes used to separate the parts
124+
* @throws {RangeError} If the boundary is invalid. A valid boundary is 1 to 70 characters long,
125+
* does not end with space, and may only contain: A-Z a-z 0-9 '()+_,-./:=? and space
126+
*/
122127
public set boundary(boundary: Uint8Array | string) {
123128
this.#boundary = typeof boundary === "string" ? new TextEncoder().encode(boundary) : boundary;
124129
if (!Multipart.isValidBoundary(this.#boundary))

0 commit comments

Comments
 (0)