Added explicit parameter and method return types

This commit is contained in:
Stefan Mohr
2015-06-22 13:44:51 -07:00
parent 3e117d8c9d
commit 84b0146bd7
+39 -39
View File
@@ -9,17 +9,17 @@
declare function sandbox(attributes?: any): string;
declare function readFixtures(...uls: string[]): string;
declare function preloadFixtures(...uls: string[]);
declare function loadFixtures(...uls: string[]);
declare function appendLoadFixtures(...uls: string[]);
declare function preloadFixtures(...uls: string[]) : void;
declare function loadFixtures(...uls: string[]): void;
declare function appendLoadFixtures(...uls: string[]): void;
declare function setFixtures(html: string): string;
declare function appendSetFixtures(html: string);
declare function appendSetFixtures(html: string) : void;
declare function preloadStyleFixtures(...uls: string[]);
declare function loadStyleFixtures(...uls: string[]);
declare function appendLoadStyleFixtures(...uls: string[]);
declare function setStyleFixtures(html: string);
declare function appendSetStyleFixtures(html: string);
declare function preloadStyleFixtures(...uls: string[]) : void;
declare function loadStyleFixtures(...uls: string[]) : void;
declare function appendLoadStyleFixtures(...uls: string[]) : void;
declare function setStyleFixtures(html: string) : void;
declare function appendSetStyleFixtures(html: string) : void;
declare function loadJSONFixtures(...uls: string[]): jasmine.JSONFixtures;
declare function getJSONFixture(url: string): any;
@@ -37,47 +37,47 @@ declare module jasmine {
fixturesPath: string;
containerId: string;
set(html: string): string;
appendSet(html: string);
preload(...uls: string[]);
load(...uls: string[]);
appendLoad(...uls: string[]);
appendSet(html: string): void;
preload(...uls: string[]): void;
load(...uls: string[]): void;
appendLoad(...uls: string[]): void;
read(...uls: string[]): string;
clearCache();
cleanUp();
clearCache(): void;
cleanUp(): void;
sandbox(attributes?: any): string;
createContainer_(html: string);
addToContainer_(html: string);
createContainer_(html: string) : string;
addToContainer_(html: string): void;
getFixtureHtml_(url: string): string;
loadFixtureIntoCache_(relativeUrl: string);
loadFixtureIntoCache_(relativeUrl: string): void;
makeFixtureUrl_(relativeUrl: string): string;
proxyCallTo_(methodName: string, passedArguments): any;
proxyCallTo_(methodName: string, passedArguments: any): any;
}
interface StyleFixtures {
fixturesPath: string;
set(html: string): string;
appendSet(html: string);
preload(...uls: string[]);
load(...uls: string[]);
appendLoad(...uls: string[]);
appendSet(html: string): void;
preload(...uls: string[]) : void;
load(...uls: string[]) : void;
appendLoad(...uls: string[]) : void;
read_(...uls: string[]): string;
clearCache();
cleanUp();
createStyle_(html: string);
clearCache() : void;
cleanUp() : void;
createStyle_(html: string) : void;
getFixtureHtml_(url: string): string;
loadFixtureIntoCache_(relativeUrl: string);
loadFixtureIntoCache_(relativeUrl: string) : void;
makeFixtureUrl_(relativeUrl: string): string;
proxyCallTo_(methodName: string, passedArguments): any;
proxyCallTo_(methodName: string, passedArguments: any): any;
}
interface JSONFixtures {
fixturesPath: string;
load(...uls: string[]);
load(...uls: string[]): void;
read(...uls: string[]): string;
clearCache();
clearCache(): void;
getFixtureData_(url: string): any;
loadFixtureIntoCache_(relativeUrl: string);
proxyCallTo_(methodName: string, passedArguments): any;
loadFixtureIntoCache_(relativeUrl: string): void;
proxyCallTo_(methodName: string, passedArguments: any): any;
}
interface Matchers {
@@ -105,7 +105,7 @@ declare module jasmine {
* // returns true
* expect($('<div style="display: none; margin: 10px;"></div>')).toHaveCss({margin: "10px"})
*/
toHaveCss(css: Object): boolean;
toHaveCss(css: any): boolean;
/**
* Checks if DOM element is visible.
@@ -162,7 +162,7 @@ declare module jasmine {
* @param attributeName Name of the attribute to check
* @param expectedAttributeValue Expected attribute value
*/
toHaveAttr(attributeName: string, expectedAttributeValue?): boolean;
toHaveAttr(attributeName: string, expectedAttributeValue? : any): boolean;
/**
* Check if DOM element contains a property and, optionally, if the value of the property is equal to the expected one.
@@ -170,7 +170,7 @@ declare module jasmine {
* @param propertyName Property name to check
* @param expectedPropertyValue Expected property value
*/
toHaveProp(propertyName: string, expectedPropertyValue?): boolean;
toHaveProp(propertyName: string, expectedPropertyValue? : any): boolean;
/**
* Check if DOM element has the given Id
@@ -223,14 +223,14 @@ declare module jasmine {
* // returns true
* expect($('<input type="text" value="some text"/>')).toHaveValue('some text')
*/
toHaveValue(value): boolean;
toHaveValue(value : string): boolean;
/**
* Check if DOM element has the given data.
* This can only be applied for element on with jQuery data(key) can be called.
*
*/
toHaveData(key, expectedValue): boolean;
toHaveData(key : string, expectedValue : string): boolean;
toBe(selector: JQuery): boolean;
/**
@@ -295,7 +295,7 @@ declare module jasmine {
* @example
* expect($form).toHandleWith("submit", yourSubmitCallback)
*/
toHandleWith(eventName: string, eventHandler): boolean;
toHandleWith(eventName: string, eventHandler : JQueryCallback): boolean;
/**
* Checks if event was triggered.
@@ -381,7 +381,7 @@ declare module jasmine {
wasTriggeredWith(selector: string, eventName: string, expectedArgs: any, env: jasmine.Env): boolean;
wasPrevented(selector: string, eventName: string): boolean;
wasStopped(selector: string, eventName: string): boolean;
cleanUp();
cleanUp() : void;
}
var JQuery: JasmineJQuery;