From 53ae1c44a73735c1e3b088b3c5537c29bf4b86fb Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Thu, 26 May 2022 14:47:07 -0400 Subject: [PATCH] feat: add link to "DTS from JS" doc in `allowJs` in reference - `allowJs` (and `checkJs`) are marked as `relatedTo` `emitDeclarationOnly` in the reference, yet this relationship is never explained in the reference itself - as such, link out to the "DTS from JS" doc in the handbook, which explains the relationship and how to use them together in detail - hopefully this clarifies things for JS users who may be especially unfamiliar with the various tsconfig options - related to an old, closed PR of mine where I tried to remove the `relatedTo` `emitDeclarationOnly` - the alternative I listed there was to link to the "DTS from JS" doc, but that was never implemented, so doing that now! --- packages/tsconfig-reference/copy/en/options/allowJs.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/tsconfig-reference/copy/en/options/allowJs.md b/packages/tsconfig-reference/copy/en/options/allowJs.md index fa0d28e80ab2..5560f7cc43cb 100644 --- a/packages/tsconfig-reference/copy/en/options/allowJs.md +++ b/packages/tsconfig-reference/copy/en/options/allowJs.md @@ -37,3 +37,5 @@ console.log(defaultCardDeck); ``` This flag can be used as a way to incrementally add TypeScript files into JS projects by allowing the `.ts` and `.tsx` files to live along-side existing JavaScript files. + +It can also be used along-side [`declaration`](#declaration) and [`emitDeclarationOnly`](#emitDeclarationOnly) to [create declarations for JS files](/docs/handbook/declaration-files/dts-from-js.html).