Fixed a JSDoc-related crash when obtaining type of a type literal type argument (#60358)

This commit is contained in:
Mateusz Burzyński 2024-10-28 19:50:14 +01:00 committed by GitHub
parent 6beca69fbc
commit cb44488fce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 1 deletions

View File

@ -19362,7 +19362,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (!links.resolvedType) {
// Deferred resolution of members is handled by resolveObjectTypeMembers
const aliasSymbol = getAliasSymbolForTypeNode(node);
if (getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) {
if (!node.symbol || getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) {
links.resolvedType = emptyTypeLiteralType;
}
else {

View File

@ -0,0 +1,25 @@
/// <reference path='fourslash.ts' />
// @strict: true
// @filename: index.ts
//// class MssqlClient {
//// /**
//// *
//// * @param {Object} - args
//// * @param {String} - args.parentTable
//// * @returns {Promise<{upStatement/**/, downStatement}>}
//// */
//// async relationCreate(args) {}
//// }
////
//// export default MssqlClient;
verify.completions({
marker: "",
exact: [{
name: "readonly",
sortText: completion.SortText.GlobalsOrKeywords,
}],
isNewIdentifierLocation: true,
});