Mascara includes some useful interface-definition files. By importing these definitions, you get compile-time verification and code completion help.
Browser provided interfaces
These files contains definitions of types which are available in the browser.
browserapi - defines the main objects available in the browser: window, document and so on. Note: the declarations are just for proof-of-concept, and is not yet the full API as defined by WHATWG and W3C.
htmldom - The full W3C HTMLDOM
canvasapi - The WHATWG Canvas drawing API
logging- The console logging interface supported by most browsers
Supported third party libraries
JQuery- Mascara comes with an interface definition file for the very popular JQuery library.
Usage
The libraries are used by importing them:
import browserapi;
window.alert("hello!");
In the case of third-party libraries like JQuery, you have to ensure that the library is included at runtime via a script tag in the html.