Skip to content

Typescript config

Julian Waller edited this page Nov 26, 2022 · 2 revisions

We provide some typescript config presets that you can use. These are configured for what we believe to be best practise, but they can be configured to be too strict for some. Your full tsconfig.json could be setup as:

{
	"extends": "@companion-module/tools/tsconfig/node18/recommended",
	"include": ["src/**/*.ts"],
	"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
	"compilerOptions": {
		"outDir": "./dist",
		"baseUrl": "./",
		"paths": {
			"*": ["./node_modules/*"]
		}
	}
}

You are free to override properties as you wish, this is only our recommendation after all.

If you have any suggestions on changes to make to this base tsconfig, do open an issue to let us know. We hope to collect some alteranate presets along with recommended.

Clone this wiki locally