There are several ways to do this. Since interfaces in TypeScript are extensible, you can just add the required method to the Document interface, like so:
interface Document{
evaluate(xpathExpression:any,
contextNode?:any,
namespaceResolver?:any,
resultType?:any,
result?:any);
}
Or you could cast the document
to any
before calling the evaluate
method:
(<any>document).evaluate('...');
Something along those lines at any rate.