Define types for ‘g’ and ‘WIDGETS’
parent
194827a947
commit
defd8050f4
|
|
@ -1,3 +1,5 @@
|
||||||
|
/// <reference path="other.d.ts" />
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class containing [micro:bit's](https://www.espruino.com/MicroBit) utility functions.
|
* Class containing [micro:bit's](https://www.espruino.com/MicroBit) utility functions.
|
||||||
* @url http://www.espruino.com/Reference#Microbit
|
* @url http://www.espruino.com/Reference#Microbit
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
declare const g: typeof Graphics;
|
||||||
|
|
||||||
|
type WidgetArea = "tl" | "tr" | "bl" | "br";
|
||||||
|
type Widget = {
|
||||||
|
area: WidgetArea;
|
||||||
|
width: number;
|
||||||
|
draw: (this: { x: number; y: number }) => void;
|
||||||
|
};
|
||||||
|
declare const WIDGETS: { [key: string]: Widget };
|
||||||
Loading…
Reference in New Issue