I use clasp and VS Code to develop app which runs as Google Apps Script. In Google Apps Script every codes work as if they are written in a single file so the following results error.
a.js
const foo = "foo";
b.js
const foo = "bar";
It is virtually like:
const foo = "foo";
const foo = "bar";
When coding on VS Code I get no error from TS Server but I want it. In other word I want TS Server to treat all codes are in a single file. How can I do that?
You need to create a
tsconfig.jsonin the project directory for tsserver to recognize that both files are part of the same project. Create one like:The
treeshould look like