|
1 | 1 | // noinspection ES6UnusedImports
|
2 |
| -import {} from 'ts-expose-internals'; |
3 |
| -import path from 'path'; |
4 |
| -import ts from 'typescript'; |
5 |
| -import { cast } from './utils'; |
6 |
| -import { TsTransformPathsConfig, TsTransformPathsContext, TypeScriptThree, VisitorContext } from './types'; |
7 |
| -import { nodeVisitor } from './visitor'; |
8 |
| -import { createHarmonyFactory } from './utils/harmony-factory'; |
9 |
| -import { Minimatch } from 'minimatch'; |
| 2 | +import {} from "ts-expose-internals"; |
| 3 | +import path from "path"; |
| 4 | +import ts from "typescript"; |
| 5 | +import { cast } from "./utils"; |
| 6 | +import { TsTransformPathsConfig, TsTransformPathsContext, TypeScriptThree, VisitorContext } from "./types"; |
| 7 | +import { nodeVisitor } from "./visitor"; |
| 8 | +import { createHarmonyFactory } from "./utils/harmony-factory"; |
| 9 | +import { Minimatch } from "minimatch"; |
10 | 10 |
|
11 | 11 | /* ****************************************************************************************************************** *
|
12 | 12 | * Transformer
|
@@ -48,15 +48,15 @@ export default function transformer(
|
48 | 48 | outputFileNamesCache: new Map(),
|
49 | 49 | // Get paths patterns appropriate for TS compiler version
|
50 | 50 | pathsPatterns: tryParsePatterns
|
51 |
| - // TODO - Remove typecast when pathPatterns is recognized (probably after ts v4.4) |
52 |
| - ? (configFile?.configFileSpecs as any)?.pathPatterns || tryParsePatterns(paths) |
53 |
| - : tsInstance.getOwnKeys(paths) |
| 51 | + ? // TODO - Remove typecast when pathPatterns is recognized (probably after ts v4.4) |
| 52 | + (configFile?.configFileSpecs as any)?.pathPatterns || tryParsePatterns(paths) |
| 53 | + : tsInstance.getOwnKeys(paths), |
54 | 54 | };
|
55 | 55 |
|
56 | 56 | if (!tsTransformPathsContext.emitHost)
|
57 | 57 | throw new Error(
|
58 |
| - `typescript-transform-paths >= 3.1.0 requires an EmitHost in the TransformationContext to resolve properly.` |
59 |
| - + ` Make sure you're using either ts-patch or ttypescript.` |
| 58 | + `typescript-transform-paths >= 3.1.0 requires an EmitHost in the TransformationContext to resolve properly.` + |
| 59 | + ` Make sure you're using either ts-patch or ttypescript.` |
60 | 60 | );
|
61 | 61 |
|
62 | 62 | return (sourceFile: ts.SourceFile) => {
|
|
0 commit comments