-
|
I'm trying to build a Mod with typescript. However, when I include this in a Mod's manifest like this: {
"include": [
"$(MODDABLE)/examples/manifest_mod.json",
"$(MODDABLE)/examples/manifest_typings.json"
],
"config": {
"version": 1.1
},
"modules": {
"*": [
"./src/*"
]
},
}
mcrun failed with this: So I'm wondering if this is supported? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Thank you for the report! Yes, TypeScript is supported for mods. You are correct that it is necessary to include both "typescript": {
"tsconfig": {
"compilerOptions": {
"types": [
"$(MODDABLE)/xs/includes/xs",
"$(MODDABLE)/typings/global"
]
}
}
}We'll get that |
Beta Was this translation helpful? Give feedback.
Thank you for the report! Yes, TypeScript is supported for mods.
You are correct that it is necessary to include both
manifest_mod.jsonandmanifest_typings.jsonto use TypeScript in a mod. Unfortunately, the defaulttsconfigis missing frommanifest_typings.jsonwhich prevents it from working in some cases. If you add these lines tomanifest_types.jsonor your mod's manifest.json, it works like in a host:We'll get that
manifest_mod.jsonupdated shortly.