Configure type checking

task australia Updated Oct 26, 2026 1 min read configure-type-checking.md
Raw file servicenow.com

Configure type checking for a component and JavaScript-only project.

Before you begin

Role required: admin

About this task

Type checking is enabled by default for projects that use both TypeScript and JavaScript. For a JavaScript-only project, type checking requires a tsconfig.json file with type checking enabled.

Procedure

  1. Set the type checking property in the now-cli.json file at the root of the project.

    Note:

    If you provide both the CLI option and typescript.typeCheck, the CLI option takes precedence.

    JSON
    {                        "typescript": {                        "typeCheck": true                        }                        }
  2. Create a tsconfig.json file for a JavaScript-only project.

  3. Insert the file at the root of the project or monorepo with the following compiler options.

    Note:

    The extension provides a default tsconfig.json file. A tsconfig.json file that you define overrides the default.

    JSON
    {                        "compilerOptions": {                        "allowJs": true,                        "checkJs": true                        }                        }

Result

The extension type checks the project files according to the settings that you configured.

Search documentation
Search document titles and file paths on the australia branch