Skip to content

gavinhungry/typestring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typestring

typestring is a string-in/string-out TypeScript compiler front-end.

Installation

$ npm install typestring

Example

let typestring = require('typestring');
let js = typestring.compile('class Foo { public bar = 2; }');

Output string:

var Foo = (function () {
    function Foo() {
        this.bar = 2;
    }
    return Foo;
})();

File references

File references can be used, but the file contents must be passed to compile as strings or buffers:

typestring.compile('/// <reference path="foo.ts" />', {
  'foo.ts': fs.readFileSync('lib/foo.ts')
});

License

This software is released under the terms of the MIT license. See LICENSE.

About

String-in/string-out TypeScript compiler front-end

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •