typeinclude

    0.6.4 • Public • Published

    Package Version Build Status Coverage Status Apache License 2.0 Gratipay Tips

    node-typeinclude

    node-typeinclude makes it easy to include typescript files into your nodejs project at runtime, without the need to recompile every time you change something.

    npm install -g typeinclude
    

    wiki

    We try to keep the wiki updated and cover as much as thoroughly as possible, so check it out for examples. But if we did miss something you think's important, please tell us about it.

    class loading

    node-typeinclude allows you @include typescript classes from the top of typescript files

    @include SomeClass;
    
    var instance = new SomeClass();
    instance.doSomething();
    

    usage

    var path = require("path");
    var typeinclude = require("typeinclude")(__dirname/*Path to module's root, with the package.json*/);
    var myTypeScriptClass = typeinclude("myTypeScriptClass.ts", __dirname + path.sep + "folder with typescript relative to current file");
    myTypeScriptClass.someMethod();
    

    or from the commandline

    nodets index.ts
    

    legal

    node-typeinclude is licensed under Apache License 2.0

    Install

    npm i typeinclude

    DownloadsWeekly Downloads

    7

    Version

    0.6.4

    License

    none

    Last publish

    Collaborators

    • ktaeyln