Code of conduct
Impacted component(s)
Picker
Expected behavior
When running TypeScript over some Spectrum component files with TypeScript, I should get no errors from Spectrum dependencies
Actual behavior
Instead, I am getting this error from TypeScript
➜ greenwood-lit-ssr git:(demo-spectrum) ✗ pnpm lint:types
> greenwood-demo-adapter-vercel@1.0.0 lint:types /Users/owenbuckley/Workspace/github/greenwood-lit-ssr
> tsc --project ./tsconfig.json
node_modules/.pnpm/@spectrum-web-components+picker@1.0.1/node_modules/@spectrum-web-components/picker/src/InteractionController.d.ts:2:33 - error TS2307: Cannot find module '@spectrum-web-components/overlay/src/AbstractOverlay' or its corresponding type declarations.
2 import { AbstractOverlay } from '@spectrum-web-components/overlay/src/AbstractOverlay';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Screenshots
No response
What browsers are you seeing the problem in?
No response
How can we reproduce this issue?
- Have a minimal tsconfig.json
{
"compilerOptions": {
"target": "es2022",
"module": "preserve",
"lib": ["es2022", "DOM", "DOM.Iterable", "esnext"],
"allowSyntheticDefaultImports": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": false,
"noEmit": true,
"checkJs": true
},
}
- Run TypeScript over a file with these contents
import '@spectrum-web-components/theme/sp-theme.js';
import '@spectrum-web-components/theme/src/themes.js';
import '@spectrum-web-components/button/sp-button.js';
import '@spectrum-web-components/action-menu/sp-action-menu.js';
import '@spectrum-web-components/menu/sp-menu.js';
import '@spectrum-web-components/menu/sp-menu-item.js';
import '@spectrum-web-components/menu/sp-menu-divider.js';
import '@spectrum-web-components/menu/sp-menu-group.js';
Sample code or abstract reproduction which illustrates the problem
Reproduction repo (just remove the pnpm patches, or use something like Yarn / NPM to install the deps)
Use npm run lint:types to run tsc
Severity
None
Logs taken while reproducing problem
see above
Code of conduct
Impacted component(s)
Picker
Expected behavior
When running TypeScript over some Spectrum component files with TypeScript, I should get no errors from Spectrum dependencies
Actual behavior
Instead, I am getting this error from TypeScript
Screenshots
No response
What browsers are you seeing the problem in?
No response
How can we reproduce this issue?
{ "compilerOptions": { "target": "es2022", "module": "preserve", "lib": ["es2022", "DOM", "DOM.Iterable", "esnext"], "allowSyntheticDefaultImports": true, "moduleResolution": "bundler", "allowImportingTsExtensions": true, "verbatimModuleSyntax": false, "noEmit": true, "checkJs": true }, }Sample code or abstract reproduction which illustrates the problem
Reproduction repo (just remove the pnpm patches, or use something like Yarn / NPM to install the deps)
Use
npm run lint:typesto runtscSeverity
None
Logs taken while reproducing problem
see above