Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use TypeScript Examples Note partial #13212

Merged
merged 1 commit into from
Sep 5, 2022
Merged

docs: use TypeScript Examples Note partial #13212

merged 1 commit into from
Sep 5, 2022

Conversation

mrazauskas
Copy link
Contributor

Summary

Seems like it is time to refactor "TypeScript example will work..." note to a partial. Will be easier to maintain it this way.

(Docusaurus is so smart!)

Test plan

Deploy preview.

@@ -994,6 +988,8 @@ For simplicity `test.each` is picked for the examples, but the type inference is
The array of objects API is most verbose, but it makes the type inference a painless task. A `table` can be inlined:

```ts
import {test} from '@jest/globals';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to MockFunctionApi docs – note at the top and explicit imports in TypeScript Usage sections.

Comment on lines +8 to +10
import TypeScriptExamplesNote from './_TypeScriptExamplesNote.md';

<TypeScriptExamplesNote />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it is about jest.mocked and jest.Mocked. Just in case, because these two currently differ from @types/jest.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@SimenB SimenB merged commit 396b3fa into jestjs:main Sep 5, 2022
@mrazauskas mrazauskas deleted the docs-use-TS-note-partial branch September 6, 2022 04:21
@github-actions
Copy link

github-actions bot commented Oct 7, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants