Skip to content

[Bug]: incorrect specifier for AbstractOverlay in Picker InteractionController #5374

Open
@thescientist13

Description

@thescientist13

Code of conduct

  • I agree to follow this project's 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

> [email protected] lint:types /Users/owenbuckley/Workspace/github/greenwood-lit-ssr
> tsc --project ./tsconfig.json

node_modules/.pnpm/@[email protected]/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?

  1. 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
      },
    }
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions