Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Conversation

@spadgos
Copy link

@spadgos spadgos commented Apr 26, 2017

The confusingly named messageText property of Diagnostic has the type string | DiagnosticMessageChain. That is, it could be a message, or a chain of error messages (which happens if you have an error nested in a type somewhere.

Previously, if an error had a message chain, the output was something like L123 [Object object]. This changes it to use the method ts.flattenDiagnosticMessageText which does exactly what you'd hope.

Small additional change: I don't know if it was just my own settings, but TypeScript was complaining about the line 'outDir' in this.options ? this.options.outDir : '' since it wasn't narrowing the type from string | undefined. I changed the condition and it seemed happier then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants