DefinitelyTyped/appletvjs
Andy ae4fe7b6de Use "lib" in tsconfigs instead of "target". (#13968)
* Use "lib" in tsconfigs instead of "target".

Only add "dom" to libraries that need it. This is determined by a script, so many libraries that have "dom" maybe should not.

* Update new-package and readme

* Add back "target" where necessary
2017-01-18 07:51:51 -08:00
..
appletvjs-tests.ts Remove unneeded references 2016-05-10 12:22:25 -07:00
index.d.ts Rename all entry points to index.d.ts and explicitify all file lists 2016-05-09 17:29:10 -07:00
README.md Remove unneeded references 2016-05-10 12:22:25 -07:00
tsconfig.json Use "lib" in tsconfigs instead of "target". (#13968) 2017-01-18 07:51:51 -08:00

AppleTVJS Definitions Usage Notes

Referencing AppleTVJS definition files in your code

To do that, simply add `` at the top of your code.

This will allow you to have intellisense in your AppleTVJS typescript code.

Global objects

AppleTVJS has a global App object instance that is your entry point into the javascript app. There is also a Device and navigationDocument object that is in the global context. To access any of these simply use them in your TypeScript code as so. They have aliases in the type definition file for your convenience.

The AppleTVJS namespace

All non global objects have interfaces in the AppleTVJS type definition file are contained in the AppleTVJS namespace.

To use them simple provide the namespace like so:

var keyboard: AppleTVJS.Keyboard = textfield.getFeature('Keyboard');