79583474

Date: 2025-04-20 15:08:04
Score: 1
Natty:
Report link

When you merge declarations, such as when extending existing types,TypeScript will merge the type declarations it finds, but the loading order of those types matters. TypeScript should look in the custom type path first Ensure your custom type path exemple.

❌ Wrong way

{
  "compilerOptions": {
    "typeRoots": ["./node_modules/@types", "./src/types"]
  }
}

✅ Right way

{
  "compilerOptions": {
    "typeRoots": ["./src/types", "./node_modules/@types"]
  }
}
Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): When you me
  • Low reputation (1):
Posted by: Marcos