Closed
Description
Minimal test should reproduce it (it did in the playground, confirmed it was not working with typescript@next
locally):
class Foo {}
function maker (value: string): typeof maker.Bar {}
namespace maker {
class Bar extends Foo {}
}
The stack trace locally:
/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:31991
throw e;
^
RangeError: Maximum call stack size exceeded
at checkPropertyAccessExpressionOrQualifiedName (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:17864:62)
at checkQualifiedName (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:17862:20)
at checkExpression (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:19502:24)
at getTypeFromTypeQueryNode (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14618:53)
at getTypeFromTypeNode (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14907:28)
at getSignatureFromDeclaration (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14332:34)
at getSignaturesOfSymbol (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14373:37)
at resolveAnonymousTypeMembers (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14029:38)
at resolveStructuredTypeMembers (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14057:21)
at getPropertyOfType (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14189:32)
Feel free to let me know if I'm trying to do something wrong, but it probably shouldn't crash anyway.
Edit: For additional information, it come from trying to type make-error
(https://github.com/raw/typings/typed-make-error/5a653400e91cf7046512544b7ed2ebab702b0183/index.d.ts). I noticed I had a bug when not using typeof
, and that caused it to crash.