digidem / digidem/digidem-types

instructions for TSConfig adjustments don't seem to work

Open
#8 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Using Typescript v5.2.2

The instructions currently state that you have to update you tsconfig file as follows:

{
  "compilerOptions": {
+    "typeRoots": ["node_modules/@digidem/types/vendor", "node_modules/@types"]
  }
}

however, this seems to work:

{
  "compilerOptions": {
+    "paths": {
+      "*": ["./node_modules/@digidem/types/vendor/*/index.d.ts"]
+      }
  }
}

Example tsconfig I'm using:

{
  "compilerOptions": {
    "target": "es2022",
    "lib": [
      "es2023"
    ],
    "module": "nodenext",
    "moduleResolution": "nodenext",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "allowJs": true,
    "checkJs": true,
    "noEmit": true,
    "declaration": false,
    "typeRoots": [
      "node_modules/@types",
      "node_modules/@digidem/types/vendor",
    ]
  },
  "include": [
    "src/**/*",
    "tests/**/*"
  ],
  "exclude": [
    "node_modules",
  ]
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the documentation containing the current TSConfig instructions and compare it with the reported TypeScript 5.2.2 configuration. Verify which configuration works for the vendor type definitions, then update the instructions so the documented setup matches the working result.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.