Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Cannot use TypeScript > 4.3.5 when importing FAST components #5198

Closed
janechu opened this issue Sep 16, 2021 · 12 comments · Fixed by #5788
Closed

fix: Cannot use TypeScript > 4.3.5 when importing FAST components #5198

janechu opened this issue Sep 16, 2021 · 12 comments · Fixed by #5788
Assignees
Labels
area:fast-element Pertains to fast-element area:fast-foundation Pertains to fast-foundation bug A bug community:noteworthy An issue or PR of particular interest to the community or planned for an announcement. status:in-progress Work is in progress

Comments

@janechu
Copy link
Collaborator

janechu commented Sep 16, 2021

🐛 Bug Report

TypeScript 4+ cannot be used with the @microsoft/fast-components package.

💻 Repro or Code Sample

I have created a repro here: https://github.com/janechu/typescript-4-fast-components-test

🤔 Expected Behavior

No errors and successful compilation.

😯 Current Behavior

The following errors are generated when running the above repository.

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:245:26 - error TS2320: Interface 'Anchor' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIALink'.
  Named property 'ariaAtomic' of types 'FoundationElement' and 'DelegatesARIALink' are not identical.

245 export declare interface Anchor extends StartEnd, DelegatesARIALink {
                             ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:245:26 - error TS2320: Interface 'Anchor' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIALink'.
  Named property 'ariaBusy' of types 'FoundationElement' and 'DelegatesARIALink' are not identical.

245 export declare interface Anchor extends StartEnd, DelegatesARIALink {
                             ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:245:26 - error TS2320: Interface 'Anchor' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIALink'.
  Named property 'ariaDisabled' of types 'FoundationElement' and 'DelegatesARIALink' are not identical.

245 export declare interface Anchor extends StartEnd, DelegatesARIALink {
                             ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:245:26 - error TS2320: Interface 'Anchor' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIALink'.
  Named property 'ariaExpanded' of types 'FoundationElement' and 'DelegatesARIALink' are not identical.

245 export declare interface Anchor extends StartEnd, DelegatesARIALink {
                             ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:245:26 - error TS2320: Interface 'Anchor' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIALink'.
  Named property 'ariaHidden' of types 'FoundationElement' and 'DelegatesARIALink' are not identical.

245 export declare interface Anchor extends StartEnd, DelegatesARIALink {
                             ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:245:26 - error TS2320: Interface 'Anchor' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIALink'.
  Named property 'ariaLive' of types 'FoundationElement' and 'DelegatesARIALink' are not identical.

245 export declare interface Anchor extends StartEnd, DelegatesARIALink {
                             ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1031:26 - error TS2320: Interface 'BreadcrumbItem' cannot simultaneously extend types 'Anchor' and 'DelegatesARIALink'.
  Named property 'ariaAtomic' of types 'Anchor' and 'DelegatesARIALink' are not identical.

1031 export declare interface BreadcrumbItem extends StartEnd, DelegatesARIALink {
                              ~~~~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1031:26 - error TS2320: Interface 'BreadcrumbItem' cannot simultaneously extend types 'Anchor' and 'DelegatesARIALink'.
  Named property 'ariaBusy' of types 'Anchor' and 'DelegatesARIALink' are not identical.

1031 export declare interface BreadcrumbItem extends StartEnd, DelegatesARIALink {
                              ~~~~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1031:26 - error TS2320: Interface 'BreadcrumbItem' cannot simultaneously extend types 'Anchor' and 'DelegatesARIALink'.
  Named property 'ariaDisabled' of types 'Anchor' and 'DelegatesARIALink' are not identical.

1031 export declare interface BreadcrumbItem extends StartEnd, DelegatesARIALink {
                              ~~~~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1031:26 - error TS2320: Interface 'BreadcrumbItem' cannot simultaneously extend types 'Anchor' and 'DelegatesARIALink'.
  Named property 'ariaExpanded' of types 'Anchor' and 'DelegatesARIALink' are not identical.

1031 export declare interface BreadcrumbItem extends StartEnd, DelegatesARIALink {
                              ~~~~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1031:26 - error TS2320: Interface 'BreadcrumbItem' cannot simultaneously extend types 'Anchor' and 'DelegatesARIALink'.
  Named property 'ariaHidden' of types 'Anchor' and 'DelegatesARIALink' are not identical.

1031 export declare interface BreadcrumbItem extends StartEnd, DelegatesARIALink {
                              ~~~~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1031:26 - error TS2320: Interface 'BreadcrumbItem' cannot simultaneously extend types 'Anchor' and 'DelegatesARIALink'.
  Named property 'ariaLive' of types 'Anchor' and 'DelegatesARIALink' are not identical.

1031 export declare interface BreadcrumbItem extends StartEnd, DelegatesARIALink {
                              ~~~~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1166:26 - error TS2320: Interface 'Button' cannot simultaneously extend types 'FormAssociatedButton' and 'DelegatesARIAButton'.
  Named property 'ariaAtomic' of types 'FormAssociatedButton' and 'DelegatesARIAButton' are not identical.

1166 export declare interface Button extends StartEnd, DelegatesARIAButton {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1166:26 - error TS2320: Interface 'Button' cannot simultaneously extend types 'FormAssociatedButton' and 'DelegatesARIAButton'.
  Named property 'ariaBusy' of types 'FormAssociatedButton' and 'DelegatesARIAButton' are not identical.

1166 export declare interface Button extends StartEnd, DelegatesARIAButton {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1166:26 - error TS2320: Interface 'Button' cannot simultaneously extend types 'FormAssociatedButton' and 'DelegatesARIAButton'.
  Named property 'ariaDisabled' of types 'FormAssociatedButton' and 'DelegatesARIAButton' are not identical.

1166 export declare interface Button extends StartEnd, DelegatesARIAButton {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1166:26 - error TS2320: Interface 'Button' cannot simultaneously extend types 'FormAssociatedButton' and 'DelegatesARIAButton'.
  Named property 'ariaExpanded' of types 'FormAssociatedButton' and 'DelegatesARIAButton' are not identical.

1166 export declare interface Button extends StartEnd, DelegatesARIAButton {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1166:26 - error TS2320: Interface 'Button' cannot simultaneously extend types 'FormAssociatedButton' and 'DelegatesARIAButton'.
  Named property 'ariaHidden' of types 'FormAssociatedButton' and 'DelegatesARIAButton' are not identical.

1166 export declare interface Button extends StartEnd, DelegatesARIAButton {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1166:26 - error TS2320: Interface 'Button' cannot simultaneously extend types 'FormAssociatedButton' and 'DelegatesARIAButton'.
  Named property 'ariaLive' of types 'FormAssociatedButton' and 'DelegatesARIAButton' are not identical.

1166 export declare interface Button extends StartEnd, DelegatesARIAButton {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1166:26 - error TS2320: Interface 'Button' cannot simultaneously extend types 'FormAssociatedButton' and 'DelegatesARIAButton'.
  Named property 'ariaPressed' of types 'FormAssociatedButton' and 'DelegatesARIAButton' are not identical.

1166 export declare interface Button extends StartEnd, DelegatesARIAButton {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1604:26 - error TS2320: Interface 'Combobox' cannot simultaneously extend types 'FormAssociatedCombobox' and 'DelegatesARIACombobox'.
  Named property 'ariaAtomic' of types 'FormAssociatedCombobox' and 'DelegatesARIACombobox' are not identical.

1604 export declare interface Combobox extends StartEnd, DelegatesARIACombobox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1604:26 - error TS2320: Interface 'Combobox' cannot simultaneously extend types 'FormAssociatedCombobox' and 'DelegatesARIACombobox'.
  Named property 'ariaBusy' of types 'FormAssociatedCombobox' and 'DelegatesARIACombobox' are not identical.

1604 export declare interface Combobox extends StartEnd, DelegatesARIACombobox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1604:26 - error TS2320: Interface 'Combobox' cannot simultaneously extend types 'FormAssociatedCombobox' and 'DelegatesARIACombobox'.
  Named property 'ariaDisabled' of types 'FormAssociatedCombobox' and 'DelegatesARIACombobox' are not identical.

1604 export declare interface Combobox extends StartEnd, DelegatesARIACombobox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1604:26 - error TS2320: Interface 'Combobox' cannot simultaneously extend types 'FormAssociatedCombobox' and 'DelegatesARIACombobox'.
  Named property 'ariaHidden' of types 'FormAssociatedCombobox' and 'DelegatesARIACombobox' are not identical.

1604 export declare interface Combobox extends StartEnd, DelegatesARIACombobox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:1604:26 - error TS2320: Interface 'Combobox' cannot simultaneously extend types 'FormAssociatedCombobox' and 'DelegatesARIACombobox'.
  Named property 'ariaLive' of types 'FormAssociatedCombobox' and 'DelegatesARIACombobox' are not identical.

1604 export declare interface Combobox extends StartEnd, DelegatesARIACombobox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4237:26 - error TS2320: Interface 'Listbox' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAListbox'.
  Named property 'ariaAtomic' of types 'FoundationElement' and 'DelegatesARIAListbox' are not identical.

4237 export declare interface Listbox extends DelegatesARIAListbox {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4237:26 - error TS2320: Interface 'Listbox' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAListbox'.
  Named property 'ariaBusy' of types 'FoundationElement' and 'DelegatesARIAListbox' are not identical.

4237 export declare interface Listbox extends DelegatesARIAListbox {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4237:26 - error TS2320: Interface 'Listbox' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAListbox'.
  Named property 'ariaDisabled' of types 'FoundationElement' and 'DelegatesARIAListbox' are not identical.

4237 export declare interface Listbox extends DelegatesARIAListbox {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4237:26 - error TS2320: Interface 'Listbox' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAListbox'.
  Named property 'ariaExpanded' of types 'FoundationElement' and 'DelegatesARIAListbox' are not identical.

4237 export declare interface Listbox extends DelegatesARIAListbox {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4237:26 - error TS2320: Interface 'Listbox' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAListbox'.
  Named property 'ariaHidden' of types 'FoundationElement' and 'DelegatesARIAListbox' are not identical.

4237 export declare interface Listbox extends DelegatesARIAListbox {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4237:26 - error TS2320: Interface 'Listbox' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAListbox'.
  Named property 'ariaLive' of types 'FoundationElement' and 'DelegatesARIAListbox' are not identical.

4237 export declare interface Listbox extends DelegatesARIAListbox {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4879:26 - error TS2320: Interface 'NumberField' cannot simultaneously extend types 'FormAssociatedNumberField' and 'DelegatesARIATextbox'.
  Named property 'ariaAtomic' of types 'FormAssociatedNumberField' and 'DelegatesARIATextbox' are not identical.

4879 export declare interface NumberField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4879:26 - error TS2320: Interface 'NumberField' cannot simultaneously extend types 'FormAssociatedNumberField' and 'DelegatesARIATextbox'.
  Named property 'ariaBusy' of types 'FormAssociatedNumberField' and 'DelegatesARIATextbox' are not identical.

4879 export declare interface NumberField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4879:26 - error TS2320: Interface 'NumberField' cannot simultaneously extend types 'FormAssociatedNumberField' and 'DelegatesARIATextbox'.
  Named property 'ariaDisabled' of types 'FormAssociatedNumberField' and 'DelegatesARIATextbox' are not identical.

4879 export declare interface NumberField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4879:26 - error TS2320: Interface 'NumberField' cannot simultaneously extend types 'FormAssociatedNumberField' and 'DelegatesARIATextbox'.
  Named property 'ariaHidden' of types 'FormAssociatedNumberField' and 'DelegatesARIATextbox' are not identical.

4879 export declare interface NumberField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:4879:26 - error TS2320: Interface 'NumberField' cannot simultaneously extend types 'FormAssociatedNumberField' and 'DelegatesARIATextbox'.
  Named property 'ariaLive' of types 'FormAssociatedNumberField' and 'DelegatesARIATextbox' are not identical.

4879 export declare interface NumberField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:5640:26 - error TS2320: Interface 'Select' cannot simultaneously extend types 'FormAssociatedSelect' and 'DelegatesARIASelect'.
  Named property 'ariaAtomic' of types 'FormAssociatedSelect' and 'DelegatesARIASelect' are not identical.

5640 export declare interface Select extends StartEnd, DelegatesARIASelect {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:5640:26 - error TS2320: Interface 'Select' cannot simultaneously extend types 'FormAssociatedSelect' and 'DelegatesARIASelect'.
  Named property 'ariaBusy' of types 'FormAssociatedSelect' and 'DelegatesARIASelect' are not identical.

5640 export declare interface Select extends StartEnd, DelegatesARIASelect {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:5640:26 - error TS2320: Interface 'Select' cannot simultaneously extend types 'FormAssociatedSelect' and 'DelegatesARIASelect'.
  Named property 'ariaDisabled' of types 'FormAssociatedSelect' and 'DelegatesARIASelect' are not identical.

5640 export declare interface Select extends StartEnd, DelegatesARIASelect {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:5640:26 - error TS2320: Interface 'Select' cannot simultaneously extend types 'FormAssociatedSelect' and 'DelegatesARIASelect'.
  Named property 'ariaExpanded' of types 'FormAssociatedSelect' and 'DelegatesARIASelect' are not identical.

5640 export declare interface Select extends StartEnd, DelegatesARIASelect {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:5640:26 - error TS2320: Interface 'Select' cannot simultaneously extend types 'FormAssociatedSelect' and 'DelegatesARIASelect'.
  Named property 'ariaHidden' of types 'FormAssociatedSelect' and 'DelegatesARIASelect' are not identical.

5640 export declare interface Select extends StartEnd, DelegatesARIASelect {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:5640:26 - error TS2320: Interface 'Select' cannot simultaneously extend types 'FormAssociatedSelect' and 'DelegatesARIASelect'.
  Named property 'ariaLive' of types 'FormAssociatedSelect' and 'DelegatesARIASelect' are not identical.

5640 export declare interface Select extends StartEnd, DelegatesARIASelect {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:5640:26 - error TS2320: Interface 'Select' cannot simultaneously extend types 'FormAssociatedSelect' and 'DelegatesARIASelect'.
  Named property 'ariaPressed' of types 'FormAssociatedSelect' and 'DelegatesARIASelect' are not identical.

5640 export declare interface Select extends StartEnd, DelegatesARIASelect {
                              ~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6566:26 - error TS2320: Interface 'TextArea' cannot simultaneously extend types 'FormAssociatedTextArea' and 'DelegatesARIATextbox'.
  Named property 'ariaAtomic' of types 'FormAssociatedTextArea' and 'DelegatesARIATextbox' are not identical.

6566 export declare interface TextArea extends DelegatesARIATextbox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6566:26 - error TS2320: Interface 'TextArea' cannot simultaneously extend types 'FormAssociatedTextArea' and 'DelegatesARIATextbox'.
  Named property 'ariaBusy' of types 'FormAssociatedTextArea' and 'DelegatesARIATextbox' are not identical.

6566 export declare interface TextArea extends DelegatesARIATextbox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6566:26 - error TS2320: Interface 'TextArea' cannot simultaneously extend types 'FormAssociatedTextArea' and 'DelegatesARIATextbox'.
  Named property 'ariaDisabled' of types 'FormAssociatedTextArea' and 'DelegatesARIATextbox' are not identical.

6566 export declare interface TextArea extends DelegatesARIATextbox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6566:26 - error TS2320: Interface 'TextArea' cannot simultaneously extend types 'FormAssociatedTextArea' and 'DelegatesARIATextbox'.
  Named property 'ariaHidden' of types 'FormAssociatedTextArea' and 'DelegatesARIATextbox' are not identical.

6566 export declare interface TextArea extends DelegatesARIATextbox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6566:26 - error TS2320: Interface 'TextArea' cannot simultaneously extend types 'FormAssociatedTextArea' and 'DelegatesARIATextbox'.
  Named property 'ariaLive' of types 'FormAssociatedTextArea' and 'DelegatesARIATextbox' are not identical.

6566 export declare interface TextArea extends DelegatesARIATextbox {
                              ~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6728:26 - error TS2320: Interface 'TextField' cannot simultaneously extend types 'FormAssociatedTextField' and 'DelegatesARIATextbox'.
  Named property 'ariaAtomic' of types 'FormAssociatedTextField' and 'DelegatesARIATextbox' are not identical.

6728 export declare interface TextField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6728:26 - error TS2320: Interface 'TextField' cannot simultaneously extend types 'FormAssociatedTextField' and 'DelegatesARIATextbox'.
  Named property 'ariaBusy' of types 'FormAssociatedTextField' and 'DelegatesARIATextbox' are not identical.

6728 export declare interface TextField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6728:26 - error TS2320: Interface 'TextField' cannot simultaneously extend types 'FormAssociatedTextField' and 'DelegatesARIATextbox'.
  Named property 'ariaDisabled' of types 'FormAssociatedTextField' and 'DelegatesARIATextbox' are not identical.

6728 export declare interface TextField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6728:26 - error TS2320: Interface 'TextField' cannot simultaneously extend types 'FormAssociatedTextField' and 'DelegatesARIATextbox'.
  Named property 'ariaHidden' of types 'FormAssociatedTextField' and 'DelegatesARIATextbox' are not identical.

6728 export declare interface TextField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6728:26 - error TS2320: Interface 'TextField' cannot simultaneously extend types 'FormAssociatedTextField' and 'DelegatesARIATextbox'.
  Named property 'ariaLive' of types 'FormAssociatedTextField' and 'DelegatesARIATextbox' are not identical.

6728 export declare interface TextField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6895:26 - error TS2320: Interface 'Toolbar' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAToolbar'.
  Named property 'ariaAtomic' of types 'FoundationElement' and 'DelegatesARIAToolbar' are not identical.

6895 export declare interface Toolbar extends StartEnd, DelegatesARIAToolbar {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6895:26 - error TS2320: Interface 'Toolbar' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAToolbar'.
  Named property 'ariaBusy' of types 'FoundationElement' and 'DelegatesARIAToolbar' are not identical.

6895 export declare interface Toolbar extends StartEnd, DelegatesARIAToolbar {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6895:26 - error TS2320: Interface 'Toolbar' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAToolbar'.
  Named property 'ariaDisabled' of types 'FoundationElement' and 'DelegatesARIAToolbar' are not identical.

6895 export declare interface Toolbar extends StartEnd, DelegatesARIAToolbar {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6895:26 - error TS2320: Interface 'Toolbar' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAToolbar'.
  Named property 'ariaHidden' of types 'FoundationElement' and 'DelegatesARIAToolbar' are not identical.

6895 export declare interface Toolbar extends StartEnd, DelegatesARIAToolbar {
                              ~~~~~~~

node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6895:26 - error TS2320: Interface 'Toolbar' cannot simultaneously extend types 'FoundationElement' and 'DelegatesARIAToolbar'.
  Named property 'ariaLive' of types 'FoundationElement' and 'DelegatesARIAToolbar' are not identical.

6895 export declare interface Toolbar extends StartEnd, DelegatesARIAToolbar {
                              ~~~~~~~


Found 57 errors.

💁 Possible Solution

Update the typings in the error list above.

🔦 Context

In the course of attempting to upgrade all dependencies to overcome some npm audit warnings (webpack 5, ts-loader 9+, etc.) this issue was found.

@janechu janechu added the status:triage New Issue - needs triage label Sep 16, 2021
@radium-v
Copy link
Collaborator

The errors don't appear when using TypeScript ~4.3.5, which is mostly arbitrary - we're mainly tied to the version used by api-extractor (which is why TypeScript is locked at ^3.9.0 in the repo). The types for ARIA properties were likely added in version 4.4.

I found this related issue which talks about the ARIAMixin properties: microsoft/TypeScript-DOM-lib-generator#1119

@rajsite
Copy link

rajsite commented Sep 20, 2021

Saw a similar error and using "skipLibCheck": true in the TypeScript config helped to get builds. Ultimately we ended up aligning our TypeScript versions with our Angular project which caused us to lock at TypeScript 4.3.5 so we did not need the skipLibCheck flag anymore.

@EisenbergEffect EisenbergEffect added area:fast-element Pertains to fast-element area:fast-foundation Pertains to fast-foundation bug A bug community:noteworthy An issue or PR of particular interest to the community or planned for an announcement. status:needs-investigation Needs additional investigation and removed status:triage New Issue - needs triage labels Sep 21, 2021
@chrisdholt chrisdholt changed the title fix: Cannot use TypeScript 4+ when importing FAST components fix: Cannot use TypeScript > 4.3.5 when importing FAST components Oct 21, 2021
@chrisdholt
Copy link
Member

@janechu I've updated the title of this to reflect the version issue, I can confirm from both the Fluent and VSCode repo that 4.3.5 works. As @radium-v mentions, the issue relates to the added ARIAMixin. Specifically, all properties are typed in that object as strings, whereas we have typed specific DOMString values where applicable (MDN for reference). As a heads up, I've filed an issue in the typescript repo: microsoft/TypeScript#46456 and offered to provide a PR. If they're on board with the improvement I'll work to pri a PR which would then resolve this!

@chrisdholt
Copy link
Member

Update, for backward and forward compat reasons, it's unlikely to see types being updated to reflect more specific strings. I can say though that after digging in a bit more, I think this will be resolved if/when(?) microsoft/TypeScript-DOM-lib-generator#1184 is resolved and string | null is supported.

@Yberion
Copy link

Yberion commented Nov 9, 2021

Hello @chrisdholt,

I'm using Angular 13 with Typescript > 4.3.5 (currently 4.4.4) and both deps:

"@fluentui/web-components": "^2.0.2",
"@microsoft/fast-element": "^1.6.2",

I'm currently locked to use "skipLibCheck": true, when compiling if I want to use Typescript 4.4.4 along with @microsoft/fast-element / @fluentui/web-components.

I'm seeing a "lot" of issues, most of them locked, but I don't see any ETA on when the issue is going to be fixed.

Do you have any update on when we'll be able to use Typescript > 4.3.5 with @microsoft/fast-element ?
Or if there's another better workaround ?

@chrisdholt
Copy link
Member

Hello @chrisdholt,

I'm using Angular 13 with Typescript > 4.3.5 (currently 4.4.4) and both deps:

"@fluentui/web-components": "^2.0.2",
"@microsoft/fast-element": "^1.6.2",

I'm currently locked to use "skipLibCheck": true, when compiling if I want to use Typescript 4.4.4 along with @microsoft/fast-element / @fluentui/web-components.

I'm seeing a "lot" of issues, most of them locked, but I don't see any ETA on when the issue is going to be fixed.

Do you have any update on when we'll be able to use Typescript > 4.3.5 with @microsoft/fast-element ? Or if there's another better workaround ?

Yeah, the issue here is specifically with regard to lib-dom typings becoming non-nullable. My understanding from the typescript team is that those are automatically updated and changed, so it's not something they can just "fix" or "change". From what I can tell though, in Typescript 4.5.0-beta they appear to be introducing a method of fixing lib-dom versions, which would help to avoid this. I don't know that we can move as quickly, but you can certainly try to leverage that new feature and see if it works to resolve this.

@Ionaru
Copy link

Ionaru commented Dec 29, 2021

This issue now breaks the tutorial on https://www.fast.design/docs/integrations/angular. Maybe that should be mentioned.

@ziyoung
Copy link

ziyoung commented Jan 4, 2022

Now I have also encountered this problem along with typescript@4.5.4. Project dependencies are below.

# yarn list --pattern fast
yarn list v1.22.10
├─ @microsoft/fast-element@1.6.2
├─ @microsoft/fast-foundation@2.27.3
└─ @microsoft/fast-web-utilities@5.0.2

Setting "skipLibCheck": true works for me.

@chrisdholt
Copy link
Member

Picking this up fresh

@bh3605
Copy link

bh3605 commented Sep 21, 2022

What version was this addressed in? I'm using @microsoft/mgt@2.6.1, Typescript 4.6.3, and Angular 13. Same error.

The dependency chain goes as follows
@microsoft/mgt@2.6.1 > @microsoft/mgt-components@2.6.1 > @fluentui/web-components@0.22.1 > @microsoft/fast-foundation@1.16.0

@KingOfTac
Copy link
Collaborator

What version was this addressed in? I'm using @microsoft/mgt@2.6.1, Typescript 4.6.3, and Angular 13. Same error.

The dependency chain goes as follows @microsoft/mgt@2.6.1 > @microsoft/mgt-components@2.6.1 > @fluentui/web-components@0.22.1 > @microsoft/fast-foundation@1.16.0

This appears to have been fixed earlier this year, however I'm not sure the exact package versions. The issue you're having stems from @microsoft/mgt-components using a fairly old version of @fluentui/web-components that is at least two years old considering @microsoft/fast-foundation@1.16.0 is about that old. The maintainers of @microsoft/mgt-components would need to update to the latest versions of fluentui and foundation which are at 2.5.6 and 2.46.14 respectively.

@eldarj
Copy link

eldarj commented Oct 9, 2022

How is this fixed? I just wanted to try it out and it breaks - TS version ~4.4.4 with

    "@microsoft/fast-components": "^2.30.6",
    "@microsoft/fast-element": "^1.10.5"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fast-element Pertains to fast-element area:fast-foundation Pertains to fast-foundation bug A bug community:noteworthy An issue or PR of particular interest to the community or planned for an announcement. status:in-progress Work is in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.