Skip to content

Conversation

@icedTet
Copy link
Member

@icedTet icedTet commented Aug 4, 2021

No description provided.

evanwashere and others added 30 commits December 31, 2021 07:52
Co-authored-by: Mathis Mensing <github@matmen.dev>
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;
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants