This project is read-only.

TypeScript compiler crashes on attempt to build .d.ts file

Topics: General
Nov 12, 2013 at 3:09 AM
I've been working on a port of Lukas Renggli's PetitParserDart to TypeScript:

This is currently a rough source-to-source port, until I figure out how to restructure the library to better suit TypeScript, or until TypeScript adds some kind of include directive or some form of better support for globals.

For the time being, I'm using a Grunt task to concatenate the source-files before compiling, and that "works", but at the expense of source-maps.

So the library builds without errors now, but is totally untested, since I am currently unable to build the .d.ts file from the library, and thereby unable to use (or test) the library as such.
            throw e;
TypeError: Cannot call method 'getScopedNameEx' of null
    at DeclarationEmitter.emitTypeSignature (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:30901:40)
    at DeclarationEmitter.functionDeclarationCallback (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:31176:26)
    at walk (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:30711:38)
    at AstWalker.pre (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:30730:45)
    at AstWalker.walk (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:26947:31)
    at Array.walkListChildren [as 1] (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:27127:44)
    at AstWalker.walk (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:26952:53)
    at Array.walkClassDeclChildren [as 14] (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:27400:41)
    at AstWalker.walk (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:26952:53)
    at Array.walkListChildren [as 1] (C:\Users\Rasmus\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:27127:44)
Anybody else run into this?
Nov 12, 2013 at 3:10 AM
Note, I'm compiling with -d -m AMD although what I really need is -d, but for some reason it won't compile without the -m switch either.
Nov 12, 2013 at 5:01 PM
This bug has been fixed in the develop branch. There was a lot of refactoring involved in that commit so I can't say exactly what any workaround might be (other than moving to the latest compiler sources).