-
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.json
andmanifest_typings.json
to use TypeScript in a mod. Unfortunately, the defaulttsconfig
is missing frommanifest_typings.json
which prevents it from working in some cases. If you add these lines tomanifest_types.json
or your mod's manifest.json, it works like in a host:We'll get that
manifest_mod.json
updated shortly.