question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript type definitions for @lingui/core

See original GitHub issue

This 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:closed
  • Created 5 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
LStAmourcommented, Jan 18, 2019

You can install types with npm install --save-dev @types/lingui__core or yarn add -D @types/lingui__core: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lingui__core

Also npm install --save-dev @types/lingui__react or yarn add -D @types/lingui__react: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lingui__react

And npm install --save-dev @types/lingui__macro or yarn add -D @types/lingui__macro: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lingui__macro

Any 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

1reaction
manjunatha-dcommented, Oct 4, 2018

I’ll take a stab at this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found