-
Notifications
You must be signed in to change notification settings - Fork 598
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
Comments
The errors don't appear when using TypeScript ~4.3.5, which is mostly arbitrary - we're mainly tied to the version used by I found this related issue which talks about the |
Saw a similar error and using |
@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! |
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 |
Hello @chrisdholt, I'm using Angular 13 with "@fluentui/web-components": "^2.0.2",
"@microsoft/fast-element": "^1.6.2", I'm currently locked to use 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 |
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. |
This issue now breaks the tutorial on https://www.fast.design/docs/integrations/angular. Maybe that should be mentioned. |
Now I have also encountered this problem along with
Setting |
Picking this up fresh |
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 |
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 |
How is this fixed? I just wanted to try it out and it breaks - TS version
|
🐛 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.
💁 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.The text was updated successfully, but these errors were encountered: