Replies: 2 comments
-
@mjRaza , what do you mean by sharing it with npm? Do you mean publishing it as a npm package and then using it? Here's how I am currently sharing my types. I usually define the types on the container application (which integrates the MFEs). {
"compilerOptions": {
"sourceMap": true,
"strict": true,
"jsx": "react",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
},
"include": [
"src/**/*",
"../container/src/typings/header.d.ts",
"../container/src/typings/window.d.ts"
]
} Does this solve your problem? |
Beta Was this translation helpful? Give feedback.
-
NPM sharing is the approach I have been recommending. If you have the time, you could look into writing a typescript language service plugin to enable remote type definition support like https://deno.land/ has. |
Beta Was this translation helpful? Give feedback.
-
better approach for type sharing in typescript projects? right now sharing it with npm. is there any other way?
Beta Was this translation helpful? Give feedback.
All reactions