fixes to address npm test failures

This commit is contained in:
Adam Valverde 2015-09-24 23:20:34 -07:00
parent ea07eafb7c
commit 4d7fbafc19
2 changed files with 21 additions and 7 deletions

View File

@ -85,13 +85,27 @@ function test_MediaItem() {
mediaItem.resumeTime = 0;
mediaItem.subtitle = "Subtitle";
mediaItem.loadAssetID = function (url, callback) {
var loadAssetIDCallback = function (assetID: string, error: string) {
//do something
};
mediaItem.loadCertificate = function (url, callback) {
mediaItem.loadAssetID = function (url: string, loadAssetIDCallback: (assetID: string, error: string) => void) {
//do something
};
mediaItem.loadKey = function (url, callback) {
var loadCertificateCallback = function (certificate: string, error: string) {
//do something
};
mediaItem.loadCertificate = function (url: string, loadCertificateCallback: (certificate: string, error: string) => void) {
//do something
};
var loadKeyCallback = function (key: string, renewalDate: string, error: string) {
//do something
};
mediaItem.loadKey = function (url: string, loadKeyCallback: (key: string, renewalDate: string, error: string) => void) {
//do something
};
}

View File

@ -1,5 +1,5 @@
// Type definitions for AppleTVJS
// Reference: https://developer.apple.com/library/prerelease/tvos/documentation/TVMLJS/Reference/TVJSFrameworkReference/index.html
// Project: https://developer.apple.com/library/prerelease/tvos/documentation/TVMLJS/Reference/TVJSFrameworkReference/index.html
// Definitions by: Adam Valverde <https://github.com/brainded>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@ -179,13 +179,13 @@ declare module AppleTVJS {
resumeTime: number;
/** A callback function used to load the asset identifier for an item. */
loadAssetID: (url, callback) => void;
loadAssetID: (url: string, callback: (assetID: string, error: string) => void) => void;
/** A callback function used to load the security certificate for an item. */
loadCertificate: (url, callback) => void;
loadCertificate: (url: string, callback: (certificate: string, error: string) => void) => void;
/** A callback function used to load the security key for an item. */
loadKey: (url, callback) => void;
loadKey: (url: string, requestData: any, callback: (key: string, renewalDate: string, error: string) => void) => void;
}
interface MenuBarDocument {