mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add a code fixer for --isolatedDeclarations errors (#58260)
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
This commit is contained in:
co-authored by
Andrew Branch
parent
749bd834be
commit
33b156147b
@@ -1611,6 +1611,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
getBaseTypes,
|
||||
getBaseTypeOfLiteralType,
|
||||
getWidenedType,
|
||||
getWidenedLiteralType,
|
||||
getTypeFromTypeNode: nodeIn => {
|
||||
const node = getParseTreeNode(nodeIn, isTypeNode);
|
||||
return node ? getTypeFromTypeNode(node) : errorType;
|
||||
|
||||
@@ -7336,6 +7336,46 @@
|
||||
"category": "Message",
|
||||
"code": 90061
|
||||
},
|
||||
"Add annotation of type '{0}'": {
|
||||
"category": "Message",
|
||||
"code": 90062
|
||||
},
|
||||
"Add return type '{0}'": {
|
||||
"category": "Message",
|
||||
"code": 90063
|
||||
},
|
||||
"Extract base class to variable": {
|
||||
"category": "Message",
|
||||
"code": 90064
|
||||
},
|
||||
"Extract default export to variable": {
|
||||
"category": "Message",
|
||||
"code": 90065
|
||||
},
|
||||
"Extract binding expressions to variable": {
|
||||
"category": "Message",
|
||||
"code": 90066
|
||||
},
|
||||
"Add all missing type annotations": {
|
||||
"category": "Message",
|
||||
"code": 90067
|
||||
},
|
||||
"Add satisfies and an inline type assertion with '{0}'": {
|
||||
"category": "Message",
|
||||
"code": 90068
|
||||
},
|
||||
"Extract to variable and replace with '{0} as typeof {0}'": {
|
||||
"category": "Message",
|
||||
"code": 90069
|
||||
},
|
||||
"Mark array literal as const": {
|
||||
"category": "Message",
|
||||
"code": 90070
|
||||
},
|
||||
"Annotate types of properties expando function in a namespace": {
|
||||
"category": "Message",
|
||||
"code": 90071
|
||||
},
|
||||
|
||||
"Convert function to an ES2015 class": {
|
||||
"category": "Message",
|
||||
|
||||
@@ -5022,6 +5022,8 @@ export interface TypeChecker {
|
||||
getBaseTypeOfLiteralType(type: Type): Type;
|
||||
getWidenedType(type: Type): Type;
|
||||
/** @internal */
|
||||
getWidenedLiteralType(type: Type): Type;
|
||||
/** @internal */
|
||||
getPromisedTypeOfPromise(promise: Type, errorNode?: Node): Type | undefined;
|
||||
/** @internal */
|
||||
getAwaitedType(type: Type): Type | undefined;
|
||||
|
||||
Reference in New Issue
Block a user