add tests

This commit is contained in:
Lars Michaelis
2015-12-02 11:46:17 +01:00
parent 56b3481c31
commit 2c123744f0
2 changed files with 26 additions and 1 deletions

View File

@@ -1,2 +1,27 @@
/// <reference path="jsf.d.ts" />
function callbackWithoutData() {
}
function callback(data: jsf.ajax.RequestData) {
}
class RequestOptionsImpl implements jsf.ajax.RequestOptions {
execute = "@all";
render = "@none";
}
jsf.ajax.addOnEvent(callbackWithoutData);
jsf.ajax.addOnEvent(callback);
jsf.ajax.addOnError(callbackWithoutData);
jsf.ajax.addOnError(callback);
jsf.ajax.request("someSource");
jsf.ajax.request("someSource", "change");
jsf.ajax.request("someSource", "change", new RequestOptionsImpl());
jsf.ajax.response("someRequestObject", "someContextObject");

2
jsf/jsf.d.ts vendored
View File

@@ -3,7 +3,7 @@
// Definitions by: Lars Michaelis and Stephan Zerhusen <https://github.com/ButterFaces/ButterFaces>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "jsf" {
declare module jsf {
module ajax {
interface RequestData {