From 84ff8d4d418b039cbd4ebb96a9f4e8a903a7d472 Mon Sep 17 00:00:00 2001 From: osyrisrblx Date: Tue, 10 Sep 2024 15:16:21 -0400 Subject: [PATCH] More consistent comments --- src/PathTranslator.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PathTranslator.ts b/src/PathTranslator.ts index ea91a70..dbd9e61 100644 --- a/src/PathTranslator.ts +++ b/src/PathTranslator.ts @@ -66,7 +66,7 @@ export class PathTranslator { const pathInfo = PathInfo.from(filePath); if ((pathInfo.extsPeek() === TS_EXT || pathInfo.extsPeek() === TSX_EXT) && pathInfo.extsPeek(1) !== D_EXT) { - pathInfo.exts.pop(); // pop .tsx? + pathInfo.exts.pop(); // pop .ts(x) // index -> init if (pathInfo.fileName === INDEX_NAME) { @@ -81,7 +81,7 @@ export class PathTranslator { /** * Maps an input path to an output .d.ts path - * - `.tsx?` && !`.d.tsx?` -> `.d.ts` + * - `.ts(x)` && !`.d.ts(x)` -> `.d.ts` * - `src/*` -> `out/*` */ public getOutputDeclarationPath(filePath: string) { @@ -89,7 +89,7 @@ export class PathTranslator { const pathInfo = PathInfo.from(filePath); if ((pathInfo.extsPeek() === TS_EXT || pathInfo.extsPeek() === TSX_EXT) && pathInfo.extsPeek(1) !== D_EXT) { - pathInfo.exts.pop(); // pop .tsx? + pathInfo.exts.pop(); // pop .ts(x) pathInfo.exts.push(DTS_EXT); } @@ -97,8 +97,8 @@ export class PathTranslator { } /** - * Maps an input path to an output .transformed.tsx? path - * - `.tsx?` -> `.transformed.tsx?` + * Maps an input path to an output .transformed.ts(x) path + * - `.ts(x)` -> `.transformed.ts(x)` * - `src/*` -> `out/*` */ public getOutputTransformedPath(filePath: string) { @@ -165,7 +165,7 @@ export class PathTranslator { if (this.declaration) { if ((pathInfo.extsPeek() === TS_EXT || pathInfo.extsPeek() === TSX_EXT) && pathInfo.extsPeek(1) === D_EXT) { - const tsExt = pathInfo.exts.pop(); // pop .tsx? + const tsExt = pathInfo.exts.pop(); // pop .ts(x) assert(tsExt); pathInfo.exts.pop(); // pop .d @@ -198,7 +198,7 @@ export class PathTranslator { const pathInfo = PathInfo.from(filePath); if (pathInfo.extsPeek() === TS_EXT || pathInfo.extsPeek() === TSX_EXT) { - pathInfo.exts.pop(); // pop .tsx? + pathInfo.exts.pop(); // pop .ts(x) if (pathInfo.extsPeek() === D_EXT) { pathInfo.exts.pop(); // pop .d }