Added title attribute to avoid the following error:

ERROR in /Users/jimhartford/Sites/test-app/src/app/components/app.component.ts (28,36): Argument of type '{ dom: string; "lengthMenu": (string | number)[][]; buttons: ({ extend: string; className: string...' is not assignable to parameter of type 'Settings'.
  Types of property 'buttons' are incompatible.
    Type '({ extend: string; className: string; } | { extend: string; title: string; className: string; })[]' is not assignable to type 'boolean | string[] | ButtonSettings[]'.
      Type '({ extend: string; className: string; } | { extend: string; title: string; className: string; })[]' is not assignable to type 'ButtonSettings[]'.
        Type '{ extend: string; className: string; } | { extend: string; title: string; className: string; }' is not assignable to type 'ButtonSettings'.
          Type '{ extend: string; title: string; className: string; }' is not assignable to type 'ButtonSettings'.
            Object literal may only specify known properties, and 'title' does not exist in type 'ButtonSettings'.)
This commit is contained in:
Jim Hartford
2017-03-22 09:58:50 -04:00
parent 718ba6d3d4
commit 8306a72db3
3 changed files with 8 additions and 2 deletions
@@ -22,6 +22,7 @@ $(document).ready(function () {
name: 'name',
namespace: 'namespace',
titleAttr: 'title',
title: 'title'
}
],
}
+6 -1
View File
@@ -1,6 +1,6 @@
// Type definitions for JQuery DataTables Buttons extension 1.1.0
// Project: http://datatables.net/extensions/buttons/
// Definitions by: Sam Germano <https://github.com/SammyG4Free>
// Definitions by: Sam Germano <https://github.com/SammyG4Free>, Jim Hartford <https://github.com/jimhartford>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="jquery" />
@@ -80,6 +80,11 @@ declare namespace DataTables {
*/
titleAttr?: string;
/**
* Button 'title' text
*/
title?: string;
exportOptions?: ButtonExportOptions;
autoPrint?: boolean;
customize?: FunctionButtonCustomize;
+1 -1
View File
@@ -12,7 +12,7 @@
"typeRoots": [
"../"
],
"types": [],
"types": ["jquery","datatables.net"],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},