HerringtonDarkholme / typescript-repl

An upgraded TypeScript REPL
210 stars 16 forks source link

Error while excuting `tsun` #2

Closed amio closed 9 years ago

amio commented 9 years ago
/usr/local/lib/node_modules/tsun/bin/tsun.js:214
arations[file] = service.getSourceFile(file).getNamedDeclarations().map(functi
                                                                    ^
TypeError: undefined is not a function
    at /usr/local/lib/node_modules/tsun/bin/tsun.js:214:81
    at Object.<anonymous> (/usr/local/lib/node_modules/tsun/bin/tsun.js:223:3)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/tsun/bin/tsun:2:1)
    at Module._compile (module.js:460:26)
HerringtonDarkholme commented 9 years ago

Oh... This is an incompatible TypeScript upgrade. getNamedDeclarations is no longer a public method on SourceFile. I will try to fix it.

HerringtonDarkholme commented 9 years ago

I can use private api to extract identifiers, in order to support :type, :detail and other commands. But this is hazardous. I cannot guarantee these commands in next release.

HerringtonDarkholme commented 9 years ago

Fixed in https://github.com/HerringtonDarkholme/typescript-repl/commit/c2e62a37b33a25141e2d84394cbc42e2ed490302

amio commented 9 years ago

"Who would like some pervert like you, baka!"

HerringtonDarkholme commented 9 years ago

( ´◔ ‸◔`) oh... that's totally not moe spoken by a guy