jest-editor-support
v32.0.0-beta.1
Published
[](https://github.com/jest-community/jest-editor-support/actions) [;
JESParserOptions =
{
plugins?: JESParserPluginOptions;
strictMode?: boolean;
};
JESParserPluginOptions =
{
decorators?: 'legacy' | {
decoratorsBeforeExport?: boolean;
allowCallParenthesized?: boolean;
}
}Parse is a static Jest parser which uses Babel 7 and supports js,jsx,mjs,ts,tsx files.
Supported ECMAScript proposals
- filePath = Path to the file you want to parse.
- serializedData = Serialized data, will be used instead of the filePath if available (optional).
- options:
- strictMode = If this option is activated the parser throws an exception if the filetype is not detected, defaults to false.
- pluginOptions = allow override for selected plugins options. Currently only support
decorators.
examples:
parse('test.spec.ts');
parse('parameterDecorators.spec.ts', undefined, {plugins: {decorators: 'legacy'}})
parse('parameterDecorators.spec.ts', undefined,
{plugins:
{decorators:
{decoratorsBeforeExport: false}
}
})Note
Since version 18.2.0 TypeScript is now a peer dependency. If you don't need to handle .tsx files then you can safely ignore the warning during installation.
