Skip to content

Commit 413db38

Browse files
committed
add the stub type
1 parent dd8bfa8 commit 413db38

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/jest-resolve/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ const nodePaths = NODE_PATH
4848
.map(p => path.resolve(resolvedCwd, p))
4949
: undefined;
5050

51+
// it's temporary here
52+
function newPath(path: Config.Path): Config.RPth {
53+
return {'@@__tag': 'ResolvedPath', path};
54+
}
55+
5156
/* eslint-disable-next-line no-redeclare */
5257
class Resolver {
5358
private readonly _options: ResolverConfig;

packages/jest-types/src/Config.ts

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import chalk = require('chalk');
1212
type CoverageProvider = 'babel' | 'v8';
1313

1414
export type Path = string;
15+
// @@__tag is used to simulate an apaque type, useful during refactoring
16+
// Keeping RPth of the same length as Path for now, to keep diffs to minimum
17+
// will rename it later.
18+
export type RPth = {"@@__tag": "ResolvedPath", path: string};
1519

1620
export type Glob = string;
1721

0 commit comments

Comments
 (0)