{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "TypeScript Build Configuration",
  "description": "Defines optional options for TypeScript build.",
  "type": "object",

  "additionalProperties": false,

  "properties": {
    "$schema": {
      "description": "Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.",
      "type": "string"
    },

    "extends": {
      "description": "Optionally specifies another JSON config file that this file extends from.  This provides a way for standard settings to be shared across multiple projects. To delete an inherited setting, set it to `null` in this file.",
      "type": "string"
    },

    "additionalModuleKindsToEmit": {
      "type": "array",
      "description": "If provided, emit these module kinds in addition to the modules specified in the tsconfig. Note that this option only applies to the main tsconfig.json configuration.",
      "items": {
        "type": "object",
        "properties": {
          "moduleKind": {
            "type": "string",
            "enum": ["commonjs", "amd", "umd", "system", "es2015", "esnext"]
          },

          "outFolderName": {
            "type": "string",
            "pattern": "[^\\\\\\/]"
          },

          "emitModulePackageJson": {
            "description": "If true, a package.json file will be written to the output folder with the appropriate \"type\" field for the specified module kind. This ensures that Node.js correctly interprets .js files in the output folder regardless of the nearest ancestor package.json \"type\" setting. Only valid for CommonJS, UMD, and ES module kinds.",
            "type": "boolean"
          }
        },
        "required": ["moduleKind", "outFolderName"]
      }
    },

    "onlyResolveSymlinksInNodeModules": {
      "description": "If true, the TypeScript compiler will only resolve symlinks to their targets if the links are in a node_modules folder. This significantly reduces file system operations in typical usage.",
      "type": "boolean"
    },

    "emitCjsExtensionForCommonJS": {
      "description": "If true, emit CommonJS module output to the folder specified in the tsconfig \"outDir\" compiler option with the .cjs extension alongside (or instead of, if TSConfig specifies CommonJS) the default compilation output.",
      "type": "boolean"
    },

    "emitMjsExtensionForESModule": {
      "description": "If true, emit ESNext module output to the folder specified in the tsconfig \"outDir\" compiler option with the .mjs extension alongside (or instead of, if TSConfig specifies ESNext) the default compilation output.",
      "type": "boolean"
    },

    "buildProjectReferences": {
      "description": "If true, enable behavior analogous to the \"tsc --build\" command. Will build projects referenced by the main project. Note that this will effectively enable \"noEmitOnError\".",
      "type": "boolean"
    },

    "useTranspilerWorker": {
      "description": "If true, and the tsconfig has \"isolatedModules\": true, then transpilation will happen in parallel in a worker thread.",
      "type": "boolean"
    },

    "project": {
      "description": "Specifies the tsconfig.json file that will be used for compilation. Equivalent to the \"project\" argument for the 'tsc' and 'tslint' command line tools. The default value is \"./tsconfig.json\".",
      "type": "string"
    },

    "staticAssetsToCopy": {
      "description": "Configures additional file types that should be copied into the TypeScript compiler's emit folders, for example so that these files can be resolved by import statements.",
      "type": "object",

      "additionalProperties": false,

      "properties": {
        "fileExtensions": {
          "type": "array",
          "description": "File extensions that should be copied from the source folder to the destination folder(s)",
          "items": {
            "type": "string",
            "pattern": "^\\.[A-z0-9-_.]*[A-z0-9-_]+$"
          }
        },

        "excludeGlobs": {
          "type": "array",
          "description": "Globs that should be explicitly excluded. This takes precedence over globs listed in \"includeGlobs\" and files that match the file extensions provided in \"fileExtensions\".",
          "items": {
            "type": "string",
            "pattern": "[^\\\\]"
          }
        },

        "includeGlobs": {
          "type": "array",
          "description": "Globs that should be explicitly included.",
          "items": {
            "type": "string",
            "pattern": "[^\\\\]"
          }
        }
      }
    }
  }
}
