* Get format code settings for a code writing context (e.g. when formatting text changes or completions code).
(_a, sourceFile)
| 129530 | * Get format code settings for a code writing context (e.g. when formatting text changes or completions code). |
| 129531 | */ |
| 129532 | function getFormatCodeSettingsForWriting(_a, sourceFile) { |
| 129533 | var options = _a.options; |
| 129534 | var shouldAutoDetectSemicolonPreference = !options.semicolons || options.semicolons === ts.SemicolonPreference.Ignore; |
| 129535 | var shouldRemoveSemicolons = options.semicolons === ts.SemicolonPreference.Remove || shouldAutoDetectSemicolonPreference && !probablyUsesSemicolons(sourceFile); |
| 129536 | return __assign(__assign({}, options), { semicolons: shouldRemoveSemicolons ? ts.SemicolonPreference.Remove : ts.SemicolonPreference.Ignore }); |
| 129537 | } |
| 129538 | ts.getFormatCodeSettingsForWriting = getFormatCodeSettingsForWriting; |
| 129539 | function jsxModeNeedsExplicitImport(jsx) { |
| 129540 | return jsx === 2 /* JsxEmit.React */ || jsx === 3 /* JsxEmit.ReactNative */; |
nothing calls this directly
no test coverage detected