Skip to content

devlare type-o in lib/fxp.d.cts #821

@tanium-kdp

Description

@tanium-kdp
  • 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

Type-o in lib/fxp.d.cts breaks 5.7.0 with TypeScript
code, yielding a compile-time error (shown below).

Input

Ran npx tsc on the code below. Can confirm that the type-o
exists in my node_modules dir

  3 /**
  2  * @deprecated Use npm package 'fast-xml-builder' instead
  1  */
732 devlare class XMLBuilder {
  1   constructor(options?: XmlBuilderOptions);
  2   build(jObj: any): string;
  3 }

Code

import { XMLBuilder } from 'fast-xml-parser';

const builder = new XMLBuilder();
console.log(builder.build({ hello: 'world' }));

Output

compile-time error running tsc

node_modules/.pnpm/fast-xml-parser@5.7.0/node_modules/fast-xml-parser/lib/fxp.d.cts:732:1 - error TS1435: Unknown keyword or identifier. Did you mean 'declare'?

732 devlare class XMLBuilder {
    ~~~~~~~


Found 1 error in node_modules/.pnpm/fast-xml-parser@5.7.0/node_modules/fast-xml-parser/lib/fxp.d.cts:732

expected data

(compile-time error, not runtime)

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