typescript - Importing external module -
i use toastr in typescript project. have enabled amd. have added d.ts file it.
in app.ts:
/// <reference path="scripts/typings/toastr/toastr.d.ts" /> toastr.info("test"); this compiles , runs, fails of course because toastr.js not loaded.
how require() toastr?
have tried:
import toastr = require("toastr"); but gives me message saying toastr cannot found.
i've updated definitions allow use import/require : https://github.com/borisyankov/definitelytyped/pull/4499
Comments
Post a Comment