mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
Fixed a JSDoc-related crash when obtaining type of a type literal type argument (#60358)
This commit is contained in:
parent
6beca69fbc
commit
cb44488fce
@ -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 {
|
||||
|
||||
25
tests/cases/fourslash/completionsJSDocNoCrash3.ts
Normal file
25
tests/cases/fourslash/completionsJSDocNoCrash3.ts
Normal 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,
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user