Skip to content

Commit

Permalink
docs: JS type hinting for the configuration (#11110)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSp committed Apr 28, 2021
1 parent 64d5983 commit 4c3643c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion docs/Configuration.md
Expand Up @@ -19,10 +19,13 @@ Or through JavaScript:
```js
// jest.config.js
// Sync object
module.exports = {
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
verbose: true,
};

module.exports = config;

// Or async function
module.exports = async () => {
return {
Expand Down
5 changes: 4 additions & 1 deletion website/versioned_docs/version-25.x/Configuration.md
Expand Up @@ -18,9 +18,12 @@ Or through JavaScript:

```js
// jest.config.js
module.exports = {
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
verbose: true,
};

module.exports = config;
```

Please keep in mind that the resulting configuration must be JSON-serializable.
Expand Down
5 changes: 4 additions & 1 deletion website/versioned_docs/version-26.x/Configuration.md
Expand Up @@ -19,10 +19,13 @@ Or through JavaScript:
```js
// jest.config.js
// Sync object
module.exports = {
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
verbose: true,
};

module.exports = config;

// Or async function
module.exports = async () => {
return {
Expand Down

0 comments on commit 4c3643c

Please sign in to comment.