Reputation: 68840
In an object, I need to call out to a function on that page that is not part of the typescript file. As typescript doesn't know about it, it fails to compile.
How do I tell typescript that the call is fine and to let it through? function name is MY_PERSONAL_FUNCTION in this example
var dataSource = new kendo.data.DataSource({
error: (e) => { MY_PERSONAL_FUNCTION (e); },
Upvotes: 0
Views: 33
Reputation: 20689
If you are going for quick and dirty, you can just add declare function
to the top of your script. This will tell TypeScript the function has been created somewhere else.
declare function MY_PERSONAL_FUNCTION(e: any);
var dataSource = new kendo.data.DataSource({
error: (e) => { MY_PERSONAL_FUNCTION (e); },
Upvotes: 1