DefinitelyTyped / DefinitelyTyped/DefinitelyTyped

[@types/webpack-env] Interface 'NodeJS.Module' incorrectly extends interface '__WebpackModuleApi.Module'

Open
#52,816 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
51.4k
Forks
30.4k
Avg merge
3d 21h
Merged PRs (30d)
108

Description

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @types/webpack-env@1.16.0 for the project I'm working on.

This is a proposed fix for https://github.com/DefinitelyTyped/DefinitelyTyped/issues/45993

Here is the diff that solved my problem:

diff --git a/node_modules/@types/webpack-env/index.d.ts b/node_modules/@types/webpack-env/index.d.ts
index 195a17a..a1f9ae2 100644
--- a/node_modules/@types/webpack-env/index.d.ts
+++ b/node_modules/@types/webpack-env/index.d.ts
@@ -70,7 +70,7 @@ declare namespace __WebpackModuleApi {
         loaded: boolean;
         parent: NodeModule | null | undefined;
         children: NodeModule[];
-        hot?: Hot;
+        hot: Hot;
     }
     type ModuleId = string|number;
 

This issue body was partially generated by patch-package.

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

Start in node_modules/@types/webpack-env/index.d.ts around __WebpackModuleApi.Module and compare the hot property with NodeJS.Module. Apply the proposed declaration change, then verify that the original TypeScript incompatibility is resolved; no test file is mentioned in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.