// This is a TypeScript configuration intended to be used by IsaacScript mods.
{
  // https://www.typescriptlang.org/docs/handbook/compiler-options.html
  "compilerOptions": {
    // These options are recommended in the TypeScriptToLua docs:
    // https://typescripttolua.github.io/docs/getting-started/
    "target": "ESNext",
    "lib": ["ESNext"],

    // TypeScriptToLua bundles modules, so use bundler resolution to support extensionless imports.
    "module": "ESNext",
    "moduleResolution": "Bundler",

    // We import the Isaac definitions, which also include the Lua definitions.
    "types": ["isaac-typescript-definitions"],

    // We generically enable the ability to read JSON files, since it is useful to import the
    // version of a mod from the "package.json" file. JSON files are also used in the "JSON rooms"
    // feature of the standard library.
    "resolveJsonModule": true,

    // We generically enable the ability to use decorators, since some specific ones are offered in
    // the standard library. (The standard library does not use ECMAScript decorators due to
    // limitations in TSTL.)
    "experimentalDecorators": true,

    // We need to override the "outDir" specified by the base config.
    "outDir": "${configDir}/mod",
  },

  // We cannot add values to the "tstl" object here (for TypeScriptToLua), since the entire object
  // will be overridden when it is specified in end-user mods.
}
