mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
* Fix #19959 and #19958: Remove un-localizable messages * Update message * Update diagnostic messages
This commit is contained in:
@@ -3766,7 +3766,7 @@
|
||||
"category": "Error",
|
||||
"code": 90010
|
||||
},
|
||||
"Import '{0}' from \"{1}\".": {
|
||||
"Import '{0}' from module \"{1}\".": {
|
||||
"category": "Message",
|
||||
"code": 90013
|
||||
},
|
||||
@@ -3886,13 +3886,5 @@
|
||||
"Install '{0}'": {
|
||||
"category": "Message",
|
||||
"code": 95014
|
||||
},
|
||||
"Import '{0}' = require(\"{1}\").": {
|
||||
"category": "Message",
|
||||
"code": 95015
|
||||
},
|
||||
"Import * as '{0}' from \"{1}\".": {
|
||||
"category": "Message",
|
||||
"code": 95016
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,17 +276,11 @@ namespace ts.codefix {
|
||||
}
|
||||
});
|
||||
|
||||
const actionFormat = kind === ImportKind.Equals
|
||||
? Diagnostics.Import_0_require_1
|
||||
: kind === ImportKind.Namespace
|
||||
? Diagnostics.Import_Asterisk_as_0_from_1
|
||||
: Diagnostics.Import_0_from_1;
|
||||
|
||||
// if this file doesn't have any import statements, insert an import statement and then insert a new line
|
||||
// between the only import statement and user code. Otherwise just insert the statement because chances
|
||||
// are there are already a new line seperating code and import statements.
|
||||
return createCodeAction(
|
||||
actionFormat,
|
||||
Diagnostics.Import_0_from_module_1,
|
||||
[symbolName, moduleSpecifierWithoutQuotes],
|
||||
changes,
|
||||
"NewImport",
|
||||
|
||||
Reference in New Issue
Block a user