{
  // Adapted from viem (https://github.com/wagmi-dev/viem/blob/ed779e9d5667704fd7cfc5a2af032f7a2c3cae9e/tsconfig.base.json).
  "include": ["src"],
  "compilerOptions": {
    // Type checking
    "strict": true,
    "useDefineForClassFields": true,
    "noFallthroughCasesInSwitch": true,
    "noImplicitReturns": true,
    "useUnknownInCatchVariables": true,
    "noImplicitOverride": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noUncheckedIndexedAccess": true,

    // JavaScript support
    "allowJs": false,
    "checkJs": false,
    "jsx": "react",

    // Interop constraints
    "verbatimModuleSyntax": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "resolveJsonModule": true,

    // Language and environment
    "moduleResolution": "NodeNext",
    "module": "NodeNext",
    "target": "ESNext",
    "lib": [
      "ES2022", // By using ES2022 we get access to the `.cause` property on `Error` instances.
      "DOM" // We are adding `DOM` here to get the `fetch`, etc. types. This should be removed once these types are available via DefinitelyTyped.
    ],

    // Skip type checking for node modules
    "skipLibCheck": true
  }
}
