bazelbuild / rules_typescript

MOVED to https://github.com/bazelbuild/rules_nodejs/tree/3.x/third_party/github.com/bazelbuild/rules_typescript
https://github.com/bazelbuild/rules_nodejs
Apache License 2.0
275 stars 94 forks source link

Handle a case where TS asks for no types to be resolved #500

Closed alexeagle closed 4 years ago

alexeagle commented 4 years ago

Stack trace looks like

Compilation failed TypeError: Cannot read property 'forEach' of undefined
    at internal/tsc_wrapped/compiler_host.js:333:36
    at Array.forEach (<anonymous>)
    at CompilerHost.resolveTypeReferenceDirectives (internal/tsc_wrapped/compiler_host.js:330:15)
    at resolveTypeReferenceDirectiveNamesWorker (node_modules/typescript/lib/typescript.js:95088:137)
    at Object.createProgram (node_modules/typescript/lib/typescript.js:95174:35)
    at internal/tsc_wrapped/tsc_wrapped.js:319:62
    at Object.wrap (internal/tsc_wrapped/perf_trace.js:35:16)
    at createProgramAndEmit (internal/tsc_wrapped/tsc_wrapped.js:319:31)
    at runOneBuild (internal/tsc_wrapped/tsc_wrapped.js:218:33)
    at Object.<anonymous> (internal/tsc_wrapped/worker.js:164:49)