Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
eliassjogreen committed Feb 15, 2021
1 parent a773268 commit e7a4469
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import init, { encode as wasmEncode, decode as wasmDecode, source } from "./wasm.js";
import init, {
decode as wasmDecode,
encode as wasmEncode,
source,
} from "./wasm.js";

await init(source);

Expand Down Expand Up @@ -37,13 +41,13 @@ export const FilterType = {
};

export interface DecodeResult {
image: Uint8Array,
width: number,
height: number,
colorType: ValueOf<typeof ColorType>,
bitDepth: ValueOf<typeof BitDepth>,
lineSize: number
}
image: Uint8Array;
width: number;
height: number;
colorType: ValueOf<typeof ColorType>;
bitDepth: ValueOf<typeof BitDepth>;
lineSize: number;
}

export function encode(
image: Uint8Array,
Expand Down Expand Up @@ -73,7 +77,7 @@ export function encode(

export function decode(image: Uint8Array): DecodeResult {
const res = wasmDecode(image);

return {
image: new Uint8Array(res.image),
width: res.width,
Expand Down

0 comments on commit e7a4469

Please sign in to comment.