forked from external-repos/squoosh
Add initial ts setup for libsquoosh
Convert `image_data` to typescript as an example
This commit is contained in:
11
libsquoosh/src/image_data.ts
Normal file
11
libsquoosh/src/image_data.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export default class ImageData {
|
||||
readonly data: Uint8ClampedArray;
|
||||
readonly width: number;
|
||||
readonly height: number;
|
||||
|
||||
constructor(data: Uint8ClampedArray, width: number, height: number) {
|
||||
this.data = data;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user