Definitelytyped: dataTables: [ts] Property 'DataTable' does not exist on type 'JQuery'.

Created on 8 Nov 2016  路  1Comment  路  Source: DefinitelyTyped/DefinitelyTyped

---removed--

Most helpful comment

I was dealing with precisely the same error in the title of this issue and was disappointed to see no one had commented on the fix. Obviously it's not a problem with the code in this module, but hey, a note about how it was fixed would be helpful!

It turned out the solution, for me, was getting the import statement to be correct. What was needed was:
import 'DataTables.net';

I'm new to TypeScript, so this took a little time to figure out. Why does it look strange? Go to https://www.typescriptlang.org/docs/handbook/modules.html and look for the heading Import a module for side-effects only. HTH someone else in the future...

>All comments

I was dealing with precisely the same error in the title of this issue and was disappointed to see no one had commented on the fix. Obviously it's not a problem with the code in this module, but hey, a note about how it was fixed would be helpful!

It turned out the solution, for me, was getting the import statement to be correct. What was needed was:
import 'DataTables.net';

I'm new to TypeScript, so this took a little time to figure out. Why does it look strange? Go to https://www.typescriptlang.org/docs/handbook/modules.html and look for the heading Import a module for side-effects only. HTH someone else in the future...

Was this page helpful?
0 / 5 - 0 ratings