Skip to content

X2jOptions is exported twice, making TS build fail #786

@Drarig29

Description

@Drarig29
  • Are you running the latest version?
  • Have you included sample input, output, error, and expected output?
  • Have you checked if you are using correct configuration?
  • Did you try online tool?
  • Have you checked the docs for helpful APIs and examples?

Description

The X2jOptions type is both exported here (at declaration site) and here (in fxp namespace).

Input

With typescript@5.1.6, build a project with the following import:

Code

import {XMLParser, XMLValidator} from 'fast-xml-parser'

Output

Build error:

node_modules/fast-xml-parser/lib/fxp.d.cts:527:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

527 export = fxp;
    ~~~~~~~~~~~~~

Expected data

Successful build.

Would you like to work on this issue?

  • Yes
  • No

Bookmark this repository for further updates. Visit SoloThought to know about recent features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions