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: [DI type missing in typescript environment] in [fast 2.0.1] #7065

Open
kongshu612 opened this issue Jan 24, 2025 · 0 comments
Open

fix: [DI type missing in typescript environment] in [fast 2.0.1] #7065

kongshu612 opened this issue Jan 24, 2025 · 0 comments
Labels
status:triage New Issue - needs triage

Comments

@kongshu612
Copy link

🐛 Bug Report

when we import DI from fast-element in typesciprt. this code snipt is not working import {DI} from '@microsoft/fast-element/di.js';, As a workaround, we need to include this settings in my tsconfig to specifiy path resolution

"paths": {
      "@microsoft/fast-element/di.js": [
        "node_modules/@microsoft/fast-element/dist/dts/di/di.d.ts"
      ]
} 

Can we support this out of box? it is not friendly for newbees.

💻 Repro or Code Sample

typescript verson: 5.7.2
fast-element: 2.0.1

part of the tsconfig

{
"target": "es2016",
"experimentalDecorators": true,
"module": "commonjs",
"esModuleInterop": true
}

🤔 Expected Behavior

I want to use DI feature out of box just like FastElement

😯 Current Behavior

I need to change the paths of my tsconfig so that typescript can resolve the di.d.ts

💁 Possible Solution

when we build packages, can we include the di.js into the index.js and also integrage the di.d.ts file into index.d.ts

🔦 Context

🌍 Your Environment

typescript verson: 5.7.2
fast-element: 2.0.1

part of the tsconfig

{
"target": "es2016",
"experimentalDecorators": true,
"module": "commonjs",
"esModuleInterop": true
}
@kongshu612 kongshu612 added the status:triage New Issue - needs triage label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:triage New Issue - needs triage
Projects
None yet
Development

No branches or pull requests

1 participant