getMetaDataSymbol() declares a boxed Symbol
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, typescript
- Domain
- api
Research direction
Start with the ESM and CommonJS type declarations for XMLParser.getMetaDataSymbol(), since the report says both return boxed Symbol while the implementation returns a primitive symbol. Run the reproduction with npx tsc --strict --noEmit --module nodenext repro.mts to confirm the TS2322 error. Done means that check compiles, and ESM and CommonJS consumer tests pass with the declared return type.
Written by the indexing model from the issue text.
Description
- 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? Not applicable to TypeScript declarations.
- Have you checked the docs for helpful APIs and examples?
Description
The ESM and CommonJS declarations return boxed Symbol from XMLParser.getMetaDataSymbol(), preventing direct use as a property key. The implementation returns a primitive symbol, with an existing string fallback.
Input
fast-xml-parser 5.11.2, TypeScript 5.9.3. Save as repro.mts and run npx tsc --strict --noEmit --module nodenext repro.mts.
Code
import { XMLParser } from "fast-xml-parser";
const key: PropertyKey = XMLParser.getMetaDataSymbol();
Output
error TS2322: Type 'Symbol' is not assignable to type 'PropertyKey'.
expected data
The assignment should compile. I have a declaration-only fix returning symbol | string, with ESM and CommonJS consumer tests.
Would you like to work on this issue?
- Yes
- No
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 400
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NaturalIntelligence/fast-xml-parser
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
NaturalIntelligence/fast-xml-parser#888 · 2 comments ·
Maintainers usually reply within 3 days
-
ignoreDeclaration does not ignore lower case doctype declarationMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NaturalIntelligence/fast-xml-parser#870 · 2 comments ·
Maintainers usually reply within 3 days
-
Enhance type definition for XMLParser `isArray` option when using TypeScriptMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 52/100
NaturalIntelligence/fast-xml-parser#803 · 21 comments · 2 reactions ·
Maintainers usually reply within 3 days
-
Feature-Request
Difficulty 4/5 3-5 days Newbie friendliness 52/100
NaturalIntelligence/fast-xml-parser#779 · 9 comments ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
NaturalIntelligence/fast-xml-parser#766 · 4 comments ·
Maintainers usually reply within 3 days
All issues in NaturalIntelligence/fast-xml-parser
Similar issues
-
area:install bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
yetone/magpie#2406 · 1 comment ·
Maintainers usually reply within 1 day
-
[BUG]: Prompt compressor crashes with TypeError when a past chat has a non-string response.textPossibly taken @ManojDevarajulu claimed this today. Openpossible bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Mintplex-Labs/anything-llm#6737 ·
Maintainers usually reply within 1 day
-
check:passed feeds:add
Difficulty 2/5 Under an hour Newbie friendliness 62/100
-
Remove the dead tree 'loadfail' handler in browser.js, which calls a non-existent tree.isSelected()OpenHousekeeping
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pgadmin-org/pgadmin4#10601 ·
Maintainers usually reply within 1 day