Skip to content

processDiagnosticMessages: Simplify code and emit#17463

Merged
1 commit merged intomasterfrom
diagnosticMessages
Jul 28, 2017
Merged

processDiagnosticMessages: Simplify code and emit#17463
1 commit merged intomasterfrom
diagnosticMessages

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jul 27, 2017

Currently the type of DiagnosticMessages is:

const ts.Diagnostics: {
	Unterminated_string_literal: {
	    code: number;
	    category: DiagnosticCategory;
	    key: string;
	    message: string;
	};
	Identifier_expected: {
		code: number;
		...

This changes it to:

const ts.Diagnostics: {
	Unterminated_string_literal: DiagnosticMessage;
	Identifier_expected: DiagnosticMessage;
	...
}

by changing the emit to use a diag helper function instead of having a unique object literal per diagnostic.

@ghost ghost requested a review from weswigham July 27, 2017 20:58
@ghost ghost force-pushed the diagnosticMessages branch from 877b76c to f7dacd8 Compare July 27, 2017 21:06
@ghost ghost force-pushed the diagnosticMessages branch from f7dacd8 to f1ef000 Compare July 27, 2017 21:30
@ghost ghost merged commit b81e71d into master Jul 28, 2017
@ghost ghost deleted the diagnosticMessages branch July 28, 2017 17:12
@minestarks
Copy link
Copy Markdown
Member

@minestarks
Copy link
Copy Markdown
Member

@weswigham ?

@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
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.

3 participants