fast
fast copied to clipboard
fix: [DI type missing in typescript environment] in [fast 2.0.1]
🐛 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
}