Typescript type definitions for @lingui/core
See original GitHub issueThis is a HactoberFest issue! Read the contest details for more info.
Before you begin
- Confirm that you’re working on this issue so I can add 👩💻assigned label.
- Use
next
branch as a base for your PR. This feature should be released in upcoming v3. - Read the contribution guide for info how to setup project, run tests and use development version of packages
- Join us on gitter to get support
Description
Provide Typescript type definitions for @lingui/core
Core exports few types from i18n.js
using Flow type checker. I recently learned that it’s possible to publish Typescript declaration files. This would be great for Typescript users.
Task
Provide declaration file for i18n.js
module and add it to package.json
Additional info
I have no experience with Typescript at all. Any suggestions about publishing or testing are welcome!
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Typescript — LinguiJS documentation
Lingui supports typescript types out of the box since version 3.0.0 . ... index.d.ts files with @lingui/core , @lingui/react and react as peerDependencies....
Read more >Documentation - Type Declarations - TypeScript
Built-in Type Definitions. TypeScript includes declaration files for all of the standardized built-in APIs available in JavaScript runtimes.
Read more >Documentation - Advanced Types - TypeScript
Using type predicates. To define a type guard, we simply need to define a function whose return type is a type predicate:.
Read more >TypeScript: JavaScript With Syntax For Types.
TypeScript extends JavaScript by adding types to the language. TypeScript speeds up your development experience by catching errors and providing fixes ...
Read more >@types/lingui__core - npm Package Health Analysis | Snyk
Stub TypeScript definitions entry for @lingui/core, which provides its own types definitions For more information about how to use this package see README....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can install types with
npm install --save-dev @types/lingui__core
oryarn add -D @types/lingui__core
: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lingui__coreAlso
npm install --save-dev @types/lingui__react
oryarn add -D @types/lingui__react
: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lingui__reactAnd
npm install --save-dev @types/lingui__macro
oryarn add -D @types/lingui__macro
: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lingui__macroAny issues with the types can be reported here: https://github.com/huan086/lingui-typings/issues?utf8=✓&q=is%3Aissue+
The PRs against the @types repo can be found at: https://github.com/DefinitelyTyped/DefinitelyTyped/pulls?q=is%3Apr+lingui+is%3Aclosed
A PR for this project to support TS extraction is at https://github.com/lingui/js-lingui/pull/228/files
I’ll take a stab at this.