docs(plugin): add docs

This commit is contained in:
Ibrahim Hadeed 2016-03-08 13:29:03 -05:00
parent 8855359527
commit e053c945ee

View File

@ -47,7 +47,20 @@ export interface CompassOptions {
* ````
*
* @usage
* ```js
* ```ts
* // Get the device current compass heading
* DeviceOrientation.getCurrentHeading().then(
* data => console.log(data),
* error => console.log(error)
* );
*
* // Watch the device compass heading change
* var subscription = DeviceOrientation.watchHeading().subscribe(
* data => console.log(data)
* );
*
* // Stop watching heading change
* subscription.unsubscribe();
* ```
*/
@Plugin({