Skip to content

Using Typescript in Mod #1104

Closed Answered by phoddie
linfan68 asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you for the report! Yes, TypeScript is supported for mods.

You are correct that it is necessary to include both manifest_mod.json and manifest_typings.json to use TypeScript in a mod. Unfortunately, the default tsconfig is missing from manifest_typings.json which prevents it from working in some cases. If you add these lines to manifest_types.json or your mod's manifest.json, it works like in a host:

	"typescript": {
		"tsconfig": {
			"compilerOptions": {
				"types": [
					"$(MODDABLE)/xs/includes/xs",
					"$(MODDABLE)/typings/global"
				]
			}
		}
	}

We'll get that manifest_mod.json updated shortly.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by phoddie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants