Commit f0f532d
feat: Add strict types and TSDocs to
This PR adds detailed type declarations and TSDoc comments for all exported members, as well as several new `type` and `interface` exports for ease of use.
E.g.:
```ts
export class Image {
// ...
/**
* Encodes the image into a JPEG.
*
* @param quality `1`-`100`, where `1` is lowest quality (highest compression)
* and `100` is highest quality (lowest compression). Default: `90`
*/
async encodeJPEG(quality?: JPEGQuality): Promise<Uint8Array>;
// ...
}
/**
* - `0` = **lowest** quality (smallest file size)
* - `100` = **highest** quality (largest file size)
*/
export type JPEGQuality =
| 1
| 2
| 3
// ...
| 98
| 99
| 100;
```ImageScript.d.ts (#43)1 parent 1524a8b commit f0f532d
1 file changed
+862
-142
lines changed
0 commit comments