interop
Files under @repobuddy/typescript/tsconfig/interop/ match the
Interop Constraints category of the TSConfig
reference.
| File | Sets |
|---|---|
interop/buddy |
forceConsistentCasingInFileNames, isolatedModules |
interop/esm |
esModuleInterop |
interop/buddy
Section titled “interop/buddy”The recommended interop settings. Used by tsconfig/monorepo.
{ "compilerOptions": { "forceConsistentCasingInFileNames": true, "isolatedModules": true }}forceConsistentCasingInFileNamesrejects an import whose casing differs from the file name on disk.isolatedModulesreports code that a single-file transpiler (esbuild, SWC, Babel) cannot compile.tsc --showConfig(TypeScript 7.0.2) also listspreserveConstEnums: true, which TypeScript derives fromisolatedModules.
interop/esm
Section titled “interop/esm”{ "compilerOptions": { "esModuleInterop": true }}Use it with module set to an ES* value or CommonJS. Do not use it with Node16 or NodeNext (the file’s own
comment says so).
modules/buddy-commonjs already sets
esModuleInterop, so you do not need this file with it.