Thanks to visit codestin.com
Credit goes to github.com

Skip to content

misleading verbatimModuleSyntax description #62431

@dynst

Description

@dynst

Acknowledgement

  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

Comment

name: "verbatimModuleSyntax",
type: "boolean",
affectsEmit: true,
affectsSemanticDiagnostics: true,
affectsBuildInfo: true,
category: Diagnostics.Interop_Constraints,
description: Diagnostics.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting,

"Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.": {

It says "in the output file's format based on the 'module' setting" here, but targeting an output format that isn't ESM just gives an error, because it's 100% verbatim and won't transpile it into a require() call.

https://www.typescriptlang.org/tsconfig/verbatimModuleSyntax.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions