GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — Add `verbatimModuleSyntax`, deprecate `importsNotUsedAsValues` and `preserveValueImports` by andrewbranch · Pull Request #52203 · microsoft/TypeScript Conversation
|
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Interesting. Yeah I always mentally modelled |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
There is no mention of this option in https://www.typescriptlang.org/tsconfig (same for all other new options from TS 5.0), is it expected ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Xavier Fournet (@xfournet) thanks, I opened microsoft/TypeScript-Website#2759 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…roken Need to make some decisions about whether/how to emit CJS modules, because as long as we have verbatimModuleSyntax enabled, we cannot use the typical `export const = "x"` format, and tsc-multi rewriting is also now breaking for this on v5, and patching it to do the rewrites may be non trivial since it can involve shifting large blocks of code. Alternatively we could just not opt into the flag, in which case we should also restore the `isolatedModules` flag (which was removed as redunant). See: * https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#verbatimmodulesyntax * microsoft/TypeScript#52203 * tommy351/tsc-multi#19
This PR upgrades the Apollo Server repo to use TS 5.x. This change suggests we drop `importsNotUsedAsValues` in favor of the new [`verbatimModuleSyntax`](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#verbatimmodulesyntax). However, this rule [isn't really recommended or expected to be adopted by CommonJS packages](microsoft/TypeScript#52203 (comment)). So instead of opting in to the new option, I've taken the recommendation in the comment to enforce this via a lint rule which seems to have accomplished the thing we hoped to get out of `importsNotUsedAsValues` in the first place (but better, for some reason?). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…roken Need to make some decisions about whether/how to emit CJS modules, because as long as we have verbatimModuleSyntax enabled, we cannot use the typical `export const = "x"` format, and tsc-multi rewriting is also now breaking for this on v5, and patching it to do the rewrites may be non trivial since it can involve shifting large blocks of code. Alternatively we could just not opt into the flag, in which case we should also restore the `isolatedModules` flag (which was removed as redunant). See: * https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#verbatimmodulesyntax * microsoft/TypeScript#52203 * tommy351/tsc-multi#19
becaure --importsNotUsedAsValues are being deprecated, more details can be found at microsoft/TypeScript#52203
This PR upgrades the Apollo Server repo to use TS 5.x. This change suggests we drop `importsNotUsedAsValues` in favor of the new [`verbatimModuleSyntax`](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#verbatimmodulesyntax). However, this rule [isn't really recommended or expected to be adopted by CommonJS packages](microsoft/TypeScript#52203 (comment)). So instead of opting in to the new option, I've taken the recommendation in the comment to enforce this via a lint rule which seems to have accomplished the thing we hoped to get out of `importsNotUsedAsValues` in the first place (but better, for some reason?). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR upgrades the Apollo Server repo to use TS 5.x. This change suggests we drop `importsNotUsedAsValues` in favor of the new [`verbatimModuleSyntax`](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#verbatimmodulesyntax). However, this rule [isn't really recommended or expected to be adopted by CommonJS packages](microsoft/TypeScript#52203 (comment)). So instead of opting in to the new option, I've taken the recommendation in the comment to enforce this via a lint rule which seems to have accomplished the thing we hoped to get out of `importsNotUsedAsValues` in the first place (but better, for some reason?). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Proposal: deprecateimportsNotUsedAsValues and preserveValueImports in favor of single flag
There was an error while loading. Please reload this page.