mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
repond to feedback
This commit is contained in:
@@ -110,7 +110,6 @@ namespace ts {
|
||||
getParameterType: getTypeAtPosition,
|
||||
getReturnTypeOfSignature,
|
||||
getNonNullableType,
|
||||
getBaseTypeVariableOfClass,
|
||||
typeToTypeNode: nodeBuilder.typeToTypeNode,
|
||||
indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration,
|
||||
signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
|
||||
|
||||
@@ -2530,7 +2530,6 @@ namespace ts {
|
||||
*/
|
||||
/* @internal */ getParameterType(signature: Signature, parameterIndex: number): Type;
|
||||
getNonNullableType(type: Type): Type;
|
||||
/* @internal */ getBaseTypeVariableOfClass(symbol: Symbol): Type | undefined;
|
||||
|
||||
/** Note that the resulting nodes cannot be checked. */
|
||||
typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeNode;
|
||||
|
||||
@@ -49,7 +49,8 @@ namespace ts.codefix {
|
||||
const symbol = leftExpressionType.symbol;
|
||||
if (symbol.flags & SymbolFlags.Class) {
|
||||
classDeclaration = symbol.declarations && <ClassLikeDeclaration>symbol.declarations[0];
|
||||
if (getObjectFlags(leftExpressionType) & ObjectFlags.Anonymous && symbol.flags & SymbolFlags.Class && !checker.getBaseTypeVariableOfClass(symbol)) {
|
||||
if (leftExpressionType !== checker.getDeclaredTypeOfSymbol(symbol)) {
|
||||
// The expression is a class symbol but the type is not the instance-side.
|
||||
makeStatic = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user