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

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -