Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 2.24 KB

File metadata and controls

57 lines (38 loc) · 2.24 KB

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/@[email protected]_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/@[email protected]_89cf641f581d2cb2eddb2af450100ffd/node_modules/@material-ui/core/OverridableComponent'. This is likely not portable. A type annotation is necessary.

References