discord.js/tsconfig.json
Jeroen Claassens 229ad077ff
fix(rest): remove const enums in favour of regular enums (#9243)
* fix(rest): remove `const enum`s in favour of regular enums

The motivation is that `const enum` produces ambient const enums when
compiling which in turn causes issues with TypeScript 5.x when `verbatimModuleSyntax`
is enabled.

Furthermore, the generally accepted best practice is to avoid `const enum`s
when writing libraries. Can back this up with statements from TS maintainers
if needed, I know they made them, I just can't be bothered to find the GitHub
links lmao. @vladfrangu will probably be able to find those links much easier
than me as it was also the motivation to remove `const enum`'s from discord-api-types

* refactor(rest): restore `const enum` for internal enum

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-19 14:35:27 +00:00

43 lines
1,017 B
JSON

{
// Mapped from https://www.typescriptlang.org/tsconfig
"compilerOptions": {
// Type Checking
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"useUnknownInCatchVariables": true,
"noUncheckedIndexedAccess": true,
// Modules
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
// Emit
"declaration": true,
"declarationMap": true,
"importHelpers": true,
"importsNotUsedAsValues": "error",
"inlineSources": true,
"newLine": "lf",
"noEmitHelpers": true,
"outDir": "dist",
"removeComments": false,
"sourceMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
// Language and Environment
"experimentalDecorators": true,
"lib": ["ESNext"],
"target": "ES2021",
"useDefineForClassFields": true
}
}