mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add generateTypesForModule to public API (#28069)
* Add generateTypesForModule to public API * Avoid parameter initializer and update baselines
This commit is contained in:
@@ -4497,8 +4497,7 @@ namespace ts.projectSystem {
|
||||
const defaultSettings = projectService.getFormatCodeOptions(f1.path as server.NormalizedPath);
|
||||
|
||||
// set global settings
|
||||
const newGlobalSettings1 = clone(defaultSettings);
|
||||
newGlobalSettings1.placeOpenBraceOnNewLineForControlBlocks = !newGlobalSettings1.placeOpenBraceOnNewLineForControlBlocks;
|
||||
const newGlobalSettings1 = { ...defaultSettings, placeOpenBraceOnNewLineForControlBlocks: !defaultSettings.placeOpenBraceOnNewLineForControlBlocks };
|
||||
projectService.setHostConfiguration({ formatOptions: newGlobalSettings1 });
|
||||
|
||||
// get format options for file - should be equal to new global settings
|
||||
@@ -4506,8 +4505,7 @@ namespace ts.projectSystem {
|
||||
assert.deepEqual(s1, newGlobalSettings1, "file settings should be the same with global settings");
|
||||
|
||||
// set per file format options
|
||||
const newPerFileSettings = clone(defaultSettings);
|
||||
newPerFileSettings.insertSpaceAfterCommaDelimiter = !newPerFileSettings.insertSpaceAfterCommaDelimiter;
|
||||
const newPerFileSettings = { ...defaultSettings, insertSpaceAfterCommaDelimiter: !defaultSettings.insertSpaceAfterCommaDelimiter };
|
||||
projectService.setHostConfiguration({ formatOptions: newPerFileSettings, file: f1.path });
|
||||
|
||||
// get format options for file - should be equal to new per-file settings
|
||||
@@ -4515,8 +4513,7 @@ namespace ts.projectSystem {
|
||||
assert.deepEqual(s2, newPerFileSettings, "file settings should be the same with per-file settings");
|
||||
|
||||
// set new global settings - they should not affect ones that were set per-file
|
||||
const newGlobalSettings2 = clone(defaultSettings);
|
||||
newGlobalSettings2.insertSpaceAfterSemicolonInForStatements = !newGlobalSettings2.insertSpaceAfterSemicolonInForStatements;
|
||||
const newGlobalSettings2 = { ...defaultSettings, insertSpaceAfterSemicolonInForStatements: !defaultSettings.insertSpaceAfterSemicolonInForStatements };
|
||||
projectService.setHostConfiguration({ formatOptions: newGlobalSettings2 });
|
||||
|
||||
// get format options for file - should be equal to new per-file settings
|
||||
@@ -6837,7 +6834,7 @@ namespace ts.projectSystem {
|
||||
{
|
||||
start: { line: 0, offset: 0 },
|
||||
end: { line: 0, offset: 0 },
|
||||
newText: "export const a = 0;",
|
||||
newText: "export const a = 0;\n",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user