DefinitelyTyped / DefinitelyTyped/DefinitelyTyped
I18n missing constructor
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/i18n@0.13.3 for the project I'm working on.
The typings for i18n-node are missing the I18n constructor.
Here is the diff that solved my problem:
diff --git a/node_modules/@types/i18n/index.d.ts b/node_modules/@types/i18n/index.d.ts
index 08576ca..ef2a82f 100755
--- a/node_modules/@types/i18n/index.d.ts
+++ b/node_modules/@types/i18n/index.d.ts
@@ -387,6 +387,8 @@ declare namespace i18n {
const version: string;
class I18n {
+ constructor(options?: ConfigurationOptions);
+
configure(options: ConfigurationOptions): void;
init(request: Express.Request, response: Express.Response, next?: () => void): void;
This issue body was partially generated by patch-package.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open @types/i18n/index.d.ts and inspect the I18n class declaration shown in the issue. Add the missing optional constructor declaration using ConfigurationOptions, then verify that the type definition represents the constructor usage described in the report.
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
- 50/100