mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
feat(jscodeshift): update to v0.7 (#43107)
- defineTest with testOptions https://github.com/facebook/jscodeshift/releases/tag/v0.7.0 https://github.com/facebook/jscodeshift/compare/v0.7.0..v0.6.4 Co-authored-by: Trung Nguyen <trungn@axon.com>
This commit is contained in:
parent
a130517e8f
commit
4b580a2061
3
types/jscodeshift/index.d.ts
vendored
3
types/jscodeshift/index.d.ts
vendored
@ -1,7 +1,8 @@
|
||||
// Type definitions for jscodeshift 0.6
|
||||
// Type definitions for jscodeshift 0.7
|
||||
// Project: https://github.com/facebook/jscodeshift#readme
|
||||
// Definitions by: Brie Bunge <https://github.com/brieb>
|
||||
// Brian Jacobel <https://github.com/bjacobel>
|
||||
// Will Nguyen <https://github.com/willtn>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.9
|
||||
|
||||
|
||||
8
types/jscodeshift/src/testUtils.d.ts
vendored
8
types/jscodeshift/src/testUtils.d.ts
vendored
@ -1,10 +1,16 @@
|
||||
import { Transform, Options } from './core';
|
||||
import recast = require("recast");
|
||||
|
||||
export interface TestOptions {
|
||||
parser?: recast.Parser | string;
|
||||
}
|
||||
|
||||
export function defineTest(
|
||||
dirName: string,
|
||||
transformName: string,
|
||||
options: Options,
|
||||
testFilePrefix?: string
|
||||
testFilePrefix?: string,
|
||||
testOptions?: TestOptions
|
||||
): () => any;
|
||||
|
||||
export function defineInlineTest(
|
||||
|
||||
@ -87,6 +87,8 @@ testUtils.defineTest(
|
||||
"directory",
|
||||
"transformName",
|
||||
{ opt: true },
|
||||
undefined,
|
||||
{ parser: 'tsx' }
|
||||
);
|
||||
|
||||
// Can define a test
|
||||
|
||||
Loading…
Reference in New Issue
Block a user