Support typescript format configuration file
See original GitHub issue🚀 Feature Proposal
To be able to fully use TypeScript
Motivation
Make the .js file not appear in the project.
Example
This allows us to TypeScript ONLY.
Expected:
// File path: project/jest.config.ts
import { Configuration } from "jest";
import { defaults } from "jest-config";
const configure: Configuration = {
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom-fourteen',
globals: {
'ts-jest': {
isolatedModules: true,
},
},
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'],
}
export default configure
Pitch
Why does this feature belong in the Jest core platform?
Common feature proposals that do not typically make it to core:
- New matchers (see jest-extended)
- Changes to the default reporter (use custom reporters instead)
- Changes to node/jsdom test environments (use custom environments instead)
Reference
Issue Analytics
- State:
- Created 4 years ago
- Reactions:26
- Comments:10 (4 by maintainers)
Top Results From Across the Web
The Perfect Configuration Format? Try Typescript - Reflect.run
A lot of ink has been spilled about configuration file formats. Popular formats like JSON, TOML, YAML, and XML each have their advantages...
Read more >Documentation - What is a tsconfig.json - TypeScript
The presence of a tsconfig.json file in a directory indicates that the directory is the root of a TypeScript project. The tsconfig.json file...
Read more >TypeScript Programming with Visual Studio Code
VS Code includes a TypeScript formatter that provides basic code formatting with reasonable defaults. Use the typescript.format.* settings to configure the ...
Read more >typescript-formatter | Yarn - Package Manager
help Usage: tsfmt [options] [--] [files...] Options: -r, --replace replace .ts file --verify checking file format --baseDir <path> config file lookup from <path> ......
Read more >How to create an application-specific config file for TypeScript?
How would I create such a configuration file? In JavaScript, creating config.js and referencing it in the HTML code is a very simple...
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 Free
Top 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

I disagree. To me it’s a huge win if I can get a fully typed configuration without ever having to look up the documentation for every single option anymore. I’d rather have auto suggestions popping up in my editor than an X ms faster initial execution.
@septs, @nvdnkpr, @G-Rath, @brieb, @dl748, @glennreyes
Hi guys, I hope this is what you were looking for: #10564 ✌️