Skip to content

Commit cb44488

Browse files
authored
Fixed a JSDoc-related crash when obtaining type of a type literal type argument (#60358)
1 parent 6beca69 commit cb44488

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19362,7 +19362,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1936219362
if (!links.resolvedType) {
1936319363
// Deferred resolution of members is handled by resolveObjectTypeMembers
1936419364
const aliasSymbol = getAliasSymbolForTypeNode(node);
19365-
if (getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) {
19365+
if (!node.symbol || getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) {
1936619366
links.resolvedType = emptyTypeLiteralType;
1936719367
}
1936819368
else {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
// @strict: true
4+
5+
// @filename: index.ts
6+
//// class MssqlClient {
7+
//// /**
8+
//// *
9+
//// * @param {Object} - args
10+
//// * @param {String} - args.parentTable
11+
//// * @returns {Promise<{upStatement/**/, downStatement}>}
12+
//// */
13+
//// async relationCreate(args) {}
14+
//// }
15+
////
16+
//// export default MssqlClient;
17+
18+
verify.completions({
19+
marker: "",
20+
exact: [{
21+
name: "readonly",
22+
sortText: completion.SortText.GlobalsOrKeywords,
23+
}],
24+
isNewIdentifierLocation: true,
25+
});

0 commit comments

Comments
 (0)