Use JQuery interfaces directly typescript? -


i'm new typescript i'm missing here, in code i'm trying specify function returns object implements jqueryxhr interface in jquery library definition file (jquery.d.ts)

that's code

import $ = require("jquery");  interface iproduct { ... }  class product {     create(product: iproduct) : jqueryxhr {         return $.ajax(... );     } } 

jqueryxhr interface in jquery.d.ts file can't figure out how reference since it's not exported ?

try adding following top of file.

///<reference path="[relative path to]/jquery.d.ts" /> 

Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -