-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
I'm using browserify
with tsc
as a transpiler to bundle up some NPM libs for a browser project. Works for most modules I've tried, but when adding yjs
to the bundle, the compiler crashes.
TypeScript Version: 3.0.0-dev.20180622
Search Terms: RangeError
Code
#!/bin/bash
set -ex
#MODULES="libphonenumber-js yjs"
MODULES="yjs"
mkdir tsc-error
cd tsc-error
npm init --yes
npm add typescript@next browserify@16.2.2 yjs@12.3.3 libphonenumber-js@1.2.14
for module in ${MODULES}; do
(echo -n 'export default ' && npx browserify node_modules/${module}) > ${module}.js
done
npx -s bash tsc --version
npx -s bash tsc --allowJs --outFile bundle.js --module amd *.js
Expected behavior:
No crash.
Actual behavior:
RangeError: Maximum call stack size exceeded
at getResolvedSymbol (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:34092:35)
at checkIdentifier (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:35273:26)
at checkExpressionWorker (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:39935:28)
at checkExpression (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:39911:42)
at checkNonNullExpression (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:37221:37)
at checkPropertyAccessExpressionOrQualifiedName (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:37247:28)
at checkPropertyAccessExpression (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:37240:20)
at checkExpressionWorker (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:39961:28)
at checkExpression (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:39911:42)
at checkBinaryLikeExpression (/Users/mb/Desktop/tsc-error/node_modules/typescript/lib/tsc.js:39503:28)
Related Issues: #17033
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue