mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
fix(46563): show completions at this type (#46581)
This commit is contained in:
1 parent
c5d9200ec6
commit
407edc95c0
9 files changed
+45
-5
No files matched your search
@@ -432,6 +432,7 @@ namespace ts {
|
||||
getIndexInfosOfType,
|
||||
getSignaturesOfType,
|
||||
getIndexTypeOfType: (type, kind) => getIndexTypeOfType(type, kind === IndexKind.String ? stringType : numberType),
|
||||
getIndexType: type => getIndexType(type),
|
||||
getBaseTypes,
|
||||
getBaseTypeOfLiteralType,
|
||||
getWidenedType,
|
||||
@@ -15344,10 +15345,6 @@ namespace ts {
|
||||
(type.flags & (TypeFlags.InstantiableNonPrimitive | TypeFlags.Index | TypeFlags.TemplateLiteral | TypeFlags.StringMapping) && !isPatternLiteralType(type) ? ObjectFlags.IsGenericIndexType : 0);
|
||||
}
|
||||
|
||||
function isThisTypeParameter(type: Type): boolean {
|
||||
return !!(type.flags & TypeFlags.TypeParameter && (type as TypeParameter).isThisType);
|
||||
}
|
||||
|
||||
function getSimplifiedType(type: Type, writing: boolean): Type {
|
||||
return type.flags & TypeFlags.IndexedAccess ? getSimplifiedIndexedAccessType(type as IndexedAccessType, writing) :
|
||||
type.flags & TypeFlags.Conditional ? getSimplifiedConditionalType(type as ConditionalType, writing) :
|
||||
|
||||
@@ -4162,6 +4162,7 @@ namespace ts {
|
||||
getIndexInfosOfType(type: Type): readonly IndexInfo[];
|
||||
getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
|
||||
getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
|
||||
/* @internal */ getIndexType(type: Type): Type;
|
||||
getBaseTypes(type: InterfaceType): BaseType[];
|
||||
getBaseTypeOfLiteralType(type: Type): Type;
|
||||
getWidenedType(type: Type): Type;
|
||||
|
||||
@@ -7414,4 +7414,8 @@ namespace ts {
|
||||
export function escapeSnippetText(text: string): string {
|
||||
return text.replace(/\$/gm, "\\$");
|
||||
}
|
||||
|
||||
export function isThisTypeParameter(type: Type): boolean {
|
||||
return !!(type.flags & TypeFlags.TypeParameter && (type as TypeParameter).isThisType);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user