Generic React HOC: TypeError: Cannot read property 'declarations' of undefined
#41616
Labels
Milestone
TypeError: Cannot read property 'declarations' of undefined
#41616
TypeScript Version: 4.1.2
Search Terms: TypeError Cannot read property declarations of undefined
Code
src-file1.tsx
:src-file2.tsx
:Expected behavior:
Both
npx tsc --strict --noEmit --jsx 'react' src-file1.tsx
andnpx tsc --strict --noEmit --jsx 'react' src-file2.tsx
will run successfully.Actual behavior:
npx tsc --strict --noEmit --jsx 'react' src-file2.tsx
runs successfully, butnpx tsc --strict --noEmit --jsx 'react' src-file1.tsx
fails with the error message (where"$PWD"
is the present working directory and"$HOME"
is my home directory):Playground Link:
Compiling the first source file crashes the web compiler,
while compiling the second source file succeeds.
Related Issues:
#33735 #21817 #21811 #21798 #20475 #6428
The text was updated successfully, but these errors were encountered: