From 76357bd2077176becf55d24878b6c570b8406b1c Mon Sep 17 00:00:00 2001 From: Adam Valverde Date: Thu, 24 Sep 2015 11:21:42 -0700 Subject: [PATCH] adding a readme for the appletvjs type definition --- appletvjs/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 appletvjs/README.md diff --git a/appletvjs/README.md b/appletvjs/README.md new file mode 100644 index 000000000..161282ed6 --- /dev/null +++ b/appletvjs/README.md @@ -0,0 +1,21 @@ +# 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: + +```ts +var keyboard: AppleTVJS.Keyboard = textfield.getFeature('Keyboard'); +```