From 8ea1c82de88aa6a633a27e6832db60def4224acb Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Tue, 6 Feb 2024 21:57:13 -0700 Subject: [PATCH] Add proper support for the TS language server to be able to have proper type checking because of the way Foundry sets some properties --- foundry-augments.d.ts | 3 +++ jsconfig.json | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 foundry-augments.d.ts create mode 100644 jsconfig.json diff --git a/foundry-augments.d.ts b/foundry-augments.d.ts new file mode 100644 index 0000000..253df15 --- /dev/null +++ b/foundry-augments.d.ts @@ -0,0 +1,3 @@ +interface Game { + readonly settings: ClientSettings; +} \ No newline at end of file diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..97bd771 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "checkJs": true, + "target": "ES6", + "types": [ + "./foundry-augments.d.ts" + ] + }, + "include": [ + "./module/**/*", + "foundry.js" + ] +} \ No newline at end of file