BitmapLiketype
What a picture needs of its bitmap: an ImageBitmap fits. *
Import it
import type { BitmapLike } from "@johnmorrisdotca/hoshi-stars/door";
Definition
interface BitmapLike {
readonly width: number;
readonly height: number;
close?(): void;
}
Members
| Name | Type | Description |
|---|---|---|
width | number | |
height | number | |
close (optional) | (() => void) | undefined |
Examples
import type { BitmapLike } from "./data-door.ts";
const size = (bitmap: BitmapLike): number => bitmap.width * bitmap.height;