Skip to content

paynecodes/ts-repro-type-annotation-require-symlinks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reproduce TS Inferred Type Bug

Install toolchain and build projects

Install rush

npm install -g @microsoft/rush

Install monorepo depedencies

rush install

Build monorepo projects

rush rebuild

Observe bug

Open libs/ui-web/src/Button.tsx in VSCode another editor that supports the TypeScript language server.

On line 6 of libs/ui-web/src/Button.tsx VSCode reports the following error:

The inferred type of 'Button' cannot be named without a reference to '../../common/temp/node_modules/.pnpm/@material-ui+core@5.0.0-alpha.37_89cf641f581d2cb2eddb2af450100ffd/node_modules/@material-ui/core/OverridableComponent'. This is likely not portable. A type annotation is necessary.

Observe bug #2

Open apps/react-app/src/components/Button.tsx in VSCode another editor that supports the TypeScript language server.

On line 4 apps/react-app/src/components/Button.tsx VSCode reports the following error:

The inferred type of 'Button' cannot be named without a reference to '../../../../common/temp/node_modules/.pnpm/@material-ui+core@5.0.0-alpha.37_89cf641f581d2cb2eddb2af450100ffd/node_modules/@material-ui/core/OverridableComponent'. This is likely not portable. A type annotation is necessary.

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published