Skip to content

Commit 6015aa5

Browse files
committed
document the LimitError constructor
1 parent 704fb23 commit 6015aa5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎src/util/limits.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
export class LimitError extends RangeError {
55
/** `'LimitError'`: tells a limit apart from other `RangeError`s */
66
override name = 'LimitError';
7+
8+
/**
9+
* Creates the error (ImageScript throws it, there's no need to create one)
10+
* @param message Which limit was exceeded, and by what
11+
* @param options The error's `cause`, like `Error`'s
12+
*/
13+
constructor(message?: string, options?: ErrorOptions) {
14+
super(message, options);
15+
}
716
}
817

918
/** The default of the decode options' maxPixels: 16383 squared (like sharp's limitInputPixels) */

0 commit comments

Comments
 (0)