Typescript library without tsd file. Cannot instantiate class -
i'm using typescript angular , want use moltin js sdk. sdk no tsd file exists.
var moltin = new moltin({publicid: 'xxx'});
when calling moltin class tihs error:
error ts2304: cannot find name 'moltin'
so have make work? included library in index file should work, , in normal javascript. happy if don't have create tsd file on own.
if don't have definition file, can write ambient definition:
declare var moltin: any;
this mean can use moltin
variable in way you'd like... similar wild west of regular javascript. prevent using moltin
incorrectly, recommend writing definition type information create restriction @ least meets use in application.
Comments
Post a Comment