diff --git a/fullCalendar/fullCalendar-tests.ts b/fullCalendar/fullCalendar-tests.ts index 6c60f3ddb..33a5c9798 100644 --- a/fullCalendar/fullCalendar-tests.ts +++ b/fullCalendar/fullCalendar-tests.ts @@ -829,4 +829,6 @@ $(document).ready(function () { } }); -}); \ No newline at end of file +}); + +$('#calendar').fullCalendar('refetchEvents') \ No newline at end of file diff --git a/fullCalendar/fullCalendar.d.ts b/fullCalendar/fullCalendar.d.ts index b26920dc2..04698dec5 100644 --- a/fullCalendar/fullCalendar.d.ts +++ b/fullCalendar/fullCalendar.d.ts @@ -7,10 +7,25 @@ declare module FullCalendar { export interface Calendar { + /** + * Formats a Date object into a string. + */ formatDate(date: Date, format: string, options?: Options): string; + /** + * Formats a date range (two Date objects) into a string. + */ formatDates(date1: Date, date2: Date, format: string, options?: Options): string; + /** + * Parses a string into a Date object. + */ parseDate(dateString: string, ignoreTimezone?: boolean): Date; + /** + * Parses an ISO8601 string into a Date object. + */ parseISO8601(dateString: string, ignoreTimezone?: boolean): Date; + /** + * Gets the version of Fullcalendar + */ version: string; } @@ -179,33 +194,117 @@ declare module FullCalendar { } interface JQuery { + /** + * Create calendar object + */ fullCalendar(options: FullCalendar.Options): JQuery; + /** + * Generic method function + */ fullCalendar(method: string, arg1: any, arg2: any, arg3: any): void; + /** + * Get/Set option value + */ fullCalendar(method: 'option', option: string, value?: any): void; + /** + * Immediately forces the calendar to render and/or readjusts its size. + */ fullCalendar(method: 'render'): void; + /** + * Restores the element to the state before FullCalendar was initialized. + */ fullCalendar(method: 'destroy'): void; + /** + * Moves the calendar one step back (either by a month, week, or day). + */ fullCalendar(method: 'prev'): void; + /** + * Moves the calendar one step forward (either by a month, week, or day). + */ fullCalendar(method: 'next'): void; + /** + * Moves the calendar back one year. + */ fullCalendar(method: 'prevYear'): void; + /** + * Moves the calendar forward one year. + */ fullCalendar(method: 'nextYear'): void; + /** + * Moves the calendar to the current date. + */ fullCalendar(method: 'today'): void; + /** + * Returns the View Object for the current view. + */ fullCalendar(method: 'getView'): FullCalendar.View; + /** + * Immediately switches to a different view. + */ fullCalendar(method: 'changeView', viewName: string): void; + /** + * Moves the calendar to an arbitrary year/month/date. + */ fullCalendar(method: 'gotoDate', year: number, month?: number, date?: number): void; + /** + * Moves the calendar to an arbitrary date. + */ fullCalendar(method: 'gotoDate', date: Date): void; + /** + * Moves the calendar forward/backward an arbitrary amount of time. + */ fullCalendar(method: 'incrementDate', year: number, month?: number, date?: number): void; + /** + * Returns a Date object for the current date of the calendar. + */ fullCalendar(method: 'getDate'): Date; + /** + * A method for programmatically selecting a period of time. + */ fullCalendar(method: 'select', startDate: Date, endDate: Date, allDay: boolean): void; + /** + * A method for programmatically clearing the current selection. + */ fullCalendar(method: 'unselect'): void; + /** + * Reports changes to an event and renders them on the calendar. + */ fullCalendar(method: 'updateEvent', event: FullCalendar.EventObject): void; + /** + * Retrieves events that FullCalendar has in memory. + */ fullCalendar(method: 'clientEvents', idOrfilter?: any): Array; + /** + * Retrieves events that FullCalendar has in memory. + */ fullCalendar(method: 'clientEvents', idOrfilter?: (e: FullCalendar.EventObject) => boolean): Array; + /** + * Removes events from the calendar. + */ fullCalendar(method: 'removeEvents', idOrfilter?: any): void; + /** + * Removes events from the calendar. + */ fullCalendar(method: 'removeEvents', idOrfilter?: (e: FullCalendar.EventObject) => boolean): void; - fullCalendar(method: 'refreshEvents'): void; + /** + * Refetches events from all sources and rerenders them on the screen. + */ + fullCalendar(method: 'refetchEvents'): void; + /** + * Dynamically adds an event source. + */ fullCalendar(method: 'addEventSource', source: any): void; + /** + * Dynamically removes an event source. + */ fullCalendar(method: 'removeEventSource', source: any): void; + /** + * Renders a new event on the calendar. + */ fullCalendar(method: 'renderEvent', event: FullCalendar.EventObject, stick?: boolean): void; + /** + * Rerenders all events on the calendar. + */ fullCalendar(method: 'rerenderEvents'): void; } diff --git a/jquery.simplePagination/jquery.simplePagination-tests.ts b/jquery.simplePagination/jquery.simplePagination-tests.ts index f804f8760..728ca03a8 100644 --- a/jquery.simplePagination/jquery.simplePagination-tests.ts +++ b/jquery.simplePagination/jquery.simplePagination-tests.ts @@ -11,6 +11,20 @@ $(function () { }); }); +$(function () { + $(selector).pagination({ + onPageClick: (page) => { + } + }); +}); + +$(function () { + $(selector).pagination({ + onPageClick: (page, event) => { + } + }); +}); + $(function () { $(selector).pagination('selectPage', 1); }); diff --git a/jquery.simplePagination/jquery.simplePagination.d.ts b/jquery.simplePagination/jquery.simplePagination.d.ts index d3c52b8c7..1f3bc1553 100644 --- a/jquery.simplePagination/jquery.simplePagination.d.ts +++ b/jquery.simplePagination/jquery.simplePagination.d.ts @@ -18,7 +18,7 @@ interface SimplePaginationOptions { nextText?: string; cssStyle?: string; selectOnClick?: boolean; - onPageClick?: (page?: number, event?: any) => void; + onPageClick?: (page: number, event: any) => void; onInit?: () => void; } diff --git a/knockout/tests/knockout-tests.ts b/knockout/tests/knockout-tests.ts index e2fbf4c02..b0755c12a 100644 --- a/knockout/tests/knockout-tests.ts +++ b/knockout/tests/knockout-tests.ts @@ -260,7 +260,7 @@ interface KnockoutExtenders { } interface KnockoutObservableArrayFunctions { - filterByProperty(propName, matchValue): KnockoutComputed; + filterByProperty(propName, matchValue): KnockoutComputed; } declare var validate;