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.

Provide documentation comments to jest-types

See original GitHub issue

🚀 Feature Proposal

Let’s add Tsdoc compatible comment documentation to the files in jest-types so editors can show documentation for these core types across packages.

Motivation

To lower the barrier of creating environments and other Jest extension libraries.

Example

/**
 * Called once the suite has completed or failed.
 */
type SuiteDoneFn = ...

Pitch

This feature deserves to be a part of core so that the documentation is as discoverable as possible.

Other Notes:

Not sure if this is being done already, but it can also be very helpful to library users to include the source TypeScript files with the library and to enable Declaration Maps in tsc so that jumping to documentation can jump to TypeScript files directly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
SimenBcommented, Jan 16, 2020

I don’t really care about the install size if addings more comments makes things better, so I wouldn’t put too much weight on it. Issue here: #6266

1reaction
SimenBcommented, Jan 2, 2020

Happy to take a pr for tsdoc! Not sure about including the source, people are complaining about the install size already. Probably worth it, though

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Jest
Jest will run .mjs and .js files with nearest package.json 's type field set to module as ECMAScript Modules.
Read more >
types/jest dependency should be changed to @jest/types #387
@jest/types exports some TypeScript types for internal Jest packages so external packages can import them, but it does not provide global types ......
Read more >
Documentation - Triple-Slash Directives - TypeScript
Triple-slash directives are single-line comments containing a single XML tag. The contents of the comment are used as compiler directives.
Read more >
@jest/types | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Jest - TypeScript Deep Dive - Gitbook
That said, jest is an excellent unit testing option which provides great TypeScript support. ... npm i jest @types/jest ts-jest typescript -D. Explanation:....
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