@@ -16,7 +16,9 @@ declare module "image-raub" {
1616
1717 type EventEmitter = import ( 'node:events' ) . EventEmitter ;
1818
19- /** Image
19+ /**
20+ * Image
21+ *
2022 * It is similar to the web Image.
2123 * Extends EventEmitter to provide event-handling.
2224 */
@@ -32,6 +34,12 @@ declare module "image-raub" {
3234 /** An Array, containing width and height. */
3335 readonly wh : [ number , number ] ;
3436
37+ /** Image width. */
38+ readonly width : number ;
39+
40+ /** Image height. */
41+ readonly height : number ;
42+
3543 /** Alias for width. */
3644 readonly naturalWidth : number ;
3745
@@ -44,13 +52,17 @@ declare module "image-raub" {
4452 /** Image URI: local file / URL / data-uri */
4553 src : string ;
4654
47- /** Similar to .on('error', cb).
55+ /**
56+ * Similar to .on('error', cb).
57+ *
4858 * Setter adds a new callback. If passed `null`, removes ALL callbacks.
4959 * Getter returns an Array of currently existing callbacks.
5060 */
5161 onerror : null | undefined | TEventCb < TEvent > | ReadonlyArray < TEventCb < TEvent > > ;
5262
53- /** Similar to .on('load', cb).
63+ /**
64+ * Similar to .on('load', cb).
65+ *
5466 * Setter adds a new callback. If passed `null`, removes ALL callbacks.
5567 * Getter returns an Array of currently existing callbacks.
5668 */
@@ -59,7 +71,9 @@ declare module "image-raub" {
5971 /** Emit an event on behalf of this Image. */
6072 emit ( name : string , event : TEvent ) : boolean ;
6173
62- /** Add event listener.
74+ /**
75+ * Add event listener.
76+ *
6377 * 'error' - something went wrong.
6478 * 'load' - image has been loaded.
6579 */
0 commit comments