-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Labels
Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Suggestion
Make ts.getNewLineCharacter public
Use Cases
This is useful if developers create their own FormatDiagnosticsHost, but don't want to implement the logic to determine the newLine string based on the newLine compiler option.
Examples
const formatHost: ts.FormatDiagnosticsHost = {
getCurrentDirectory: () => projectDir || ts.sys.getCurrentDirectory(),
getCanonicalFileName: fileName => fileName,
getNewLine: () => ts.getNewLineCharacter(formatOptions)
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript