diff --git a/typescript/types/main.d.ts b/typescript/types/main.d.ts index 37bb9a4d1..aead3d64d 100644 --- a/typescript/types/main.d.ts +++ b/typescript/types/main.d.ts @@ -1,3 +1,5 @@ +/// + /** * Class containing [micro:bit's](https://www.espruino.com/MicroBit) utility functions. * @url http://www.espruino.com/Reference#Microbit diff --git a/typescript/types/other.d.ts b/typescript/types/other.d.ts new file mode 100644 index 000000000..83aafa56e --- /dev/null +++ b/typescript/types/other.d.ts @@ -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 };