Skip to content

Commit

Permalink
f8b118fd1b64e722ae2ba826746407661e5a1c83 Types: Define DataTablesStat…
Browse files Browse the repository at this point in the history
…icExtButtons interface which is completed by Buttons, to avoid conflicting types

f360c2086386a7bbd1838fab498ece7af58417f1 Dev: Type fixes for new caption and register methods

Sync to source repo @f360c2086386a7bbd1838fab498ece7af58417f1
  • Loading branch information
dtbuild committed Feb 14, 2024
1 parent 1ff9837 commit cb2a17f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "1.13.8",
"last-sync": "4e18b159f9180c16cb1e82122492d54542cc1129"
"last-sync": "f360c2086386a7bbd1838fab498ece7af58417f1"
}
10 changes: 7 additions & 3 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ export interface Api<T=any> {
* CSS).
* @returns DataTables API instance for chaining.
*/
caption(set, side?): Api<T>;
caption(set: string, side?: 'top' | 'bottom'): Api<T>;

/**
* Cell (single) selector and methods
Expand Down Expand Up @@ -2596,7 +2596,7 @@ export interface DataTablesStatic {
* @param name The name of the new feature.
* @param construct A function that will create the elements and event listeners for the feature being added.
*/
register(name: string, construct: (dt: InternalSettings, options: any) => HTMLElement | JQuery);
register(name: string, construct: (dt: InternalSettings, options: any) => HTMLElement | JQuery): void;
}

/**
Expand Down Expand Up @@ -2975,7 +2975,7 @@ export interface CellMetaSettings {

export interface DataTablesStaticExt {
builder: string;
buttons: {[key: string]: object};
buttons: DataTablesStaticExtButtons;
classes: ExtClassesSettings;
errMode: string;
feature: any[];
Expand All @@ -2995,6 +2995,10 @@ export interface DataTablesStaticExt {
type: ExtTypeSettings;
}

export interface DataTablesStaticExtButtons {
// Intentionally empty, completed in Buttons extension
}

/**
* Classes used by DataTables. Used for styling integration. Note
* that these all use legacy Hungarian notation.
Expand Down

0 comments on commit cb2a17f

Please sign in to comment.