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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -