DefinitelyTyped/appletvjs
2016-03-17 21:06:54 +09:00
..
appletvjs-tests.ts fixes to address npm test failures 2015-09-24 23:20:34 -07:00
appletvjs.d.ts Merge branch 'master' into rename-repo-url 2016-03-17 21:06:54 +09:00
README.md adding a readme for the appletvjs type definition 2015-09-24 11:21:42 -07:00

AppleTVJS Definitions Usage Notes

Referencing AppleTVJS definition files in your code

To do that, simply add /// <reference path="appletvjs.d.ts" /> 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');