Skip to content

types: type XMLParser.getMetaDataSymbol return value as symbol | string (#890) - #926

Open
chiragbitoni wants to merge 1 commit into
NaturalIntelligence:masterfrom
chiragbitoni:fix/types-getmetadatasymbol
Open

chiragbitoni wants to merge 1 commit into
NaturalIntelligence:masterfrom
chiragbitoni:fix/types-getmetadatasymbol

Conversation

@chiragbitoni

Copy link
Copy Markdown

Summary

In TypeScript declarations, XMLParser.getMetaDataSymbol() returned the boxed Symbol interface instead of the primitive symbol. This prevented its return value from being assigned to PropertyKey or used directly as an object property key.

Additionally, the runtime implementation provides a string fallback ("@@xmlMetadata") when Symbol is unavailable in the environment.

This PR:

  1. Updates the return type of XMLParser.getMetaDataSymbol() in src/fxp.d.ts and lib/fxp.d.cts to symbol | string.
  2. Adds a PropertyKey assignment check in spec/typings/typings-test.ts.

Fixes #890

Signed-off-by: Chirag Bitoni chiragbitoni4994@gmail.com

…ng (NaturalIntelligence#890)

In TypeScript declarations, XMLParser.getMetaDataSymbol() returned the boxed Symbol interface instead of the primitive symbol, preventing its return value from being assigned to PropertyKey or used directly as an object property key.

Additionally, the runtime implementation provides a string fallback (@@xmlMetadata) when Symbol is unavailable in the environment.

This commit updates the return type of XMLParser.getMetaDataSymbol() in src/fxp.d.ts and lib/fxp.d.cts to symbol | string, and adds a PropertyKey assignment assertion in spec/typings/typings-test.ts.

Fixes NaturalIntelligence#890

Signed-off-by: Chirag Bitoni <chiragbitoni4994@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getMetaDataSymbol() declares a boxed Symbol

1 participant