Improve references search and quick info on properties with type errors within nullable contextual types (#61383)

This commit is contained in:
Mateusz Burzyński
2025-10-30 19:54:29 +01:00
committed by GitHub
parent 6fd2874d0d
commit 2b2d6cebcb
5 changed files with 176 additions and 0 deletions

View File

@@ -3575,6 +3575,7 @@ function getSymbolAtLocationForQuickInfo(node: Node, checker: TypeChecker): Symb
* @internal
*/
export function getPropertySymbolsFromContextualType(node: ObjectLiteralElementWithName, checker: TypeChecker, contextualType: Type, unionSymbolOk: boolean): readonly Symbol[] {
contextualType = contextualType.getNonNullableType();
const name = getNameFromPropertyName(node.name);
if (!name) return emptyArray;
if (!contextualType.isUnion()) {