TypeScript
TypeScript copied to clipboard
Can't get documentation of member of parameterized class which is "export =" from another module
A.ts:
class A<T> { method() {} }
export = A;
B.ts:
import A = require('A');
new A().method();
When using code completion on the .method call in B.ts, getCompletionEntryDetails throws an exception:
TypeError: Cannot read property 'parent' of undefined
at appendOuterTypeParameters (/home/jeffrey/nbts/build/cluster/nbts-services.js:12322:28)
at getOuterTypeParametersOfClassOrInterface (/home/jeffrey/nbts/build/cluster/nbts-services.js:12338:20)
at getTypeParametersOfClassOrInterface (/home/jeffrey/nbts/build/cluster/nbts-services.js:12355:35)
at appendParentTypeArgumentsAndSymbolName (/home/jeffrey/nbts/build/cluster/nbts-services.js:11386:75)
at walkSymbol (/home/jeffrey/nbts/build/cluster/nbts-services.js:11418:29)
at Object.buildSymbolDisplay (/home/jeffrey/nbts/build/cluster/nbts-services.js:11425:21)
at /home/jeffrey/nbts/build/cluster/nbts-services.js:32608:51
at mapToDisplayParts (/home/jeffrey/nbts/build/cluster/nbts-services.js:32592:13)
at Object.symbolToDisplayParts (/home/jeffrey/nbts/build/cluster/nbts-services.js:32607:16)
at addFullSymbolName (/home/jeffrey/nbts/build/cluster/nbts-services.js:37752:49)
Several other services APIs, including getQuickInfoAtPosition and getOccurrencesAtPosition, also throw the same error when used on that .method call.
duplicate of https://github.com/Microsoft/TypeScript/issues/13014