TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

Cannot bundle express.d.ts references #16

Closed pgrm closed 8 years ago

pgrm commented 9 years ago

in the current version of express.d.ts is the following code block:

/* =================== USAGE ===================
    import express = require('express');
    var app = express();
 =============================================== */

because the end of a comment is detected with the following regex: /^[ \t]*\*+\/ it means that dts-bundle never detects the end of the comment and thinks, the whole files is commented out.

poelstra commented 9 years ago

@pgrm Note that progress is being made on creating a solution that works out-of-the-box. See e.g. https://github.com/Microsoft/TypeScript/issues/2338, https://github.com/Microsoft/TypeScript/issues/2839. In the mean time, it may be interesting to look at https://github.com/SitePen/dts-generator, as it doesn't use regexes for creating the bundles and is more recently updated.

pgrm commented 9 years ago

The typescript issues are, where I've found this repository in the first place, for now I've just put a new line before the end of the comment and that works, but I'll also try dts-generator, thx