Repository navigation
types: type XMLParser.getMetaDataSymbol return value as symbol | string (#890) - #926
Open
chiragbitoni wants to merge 1 commit into
Open
chiragbitoni wants to merge 1 commit into
chiragbitoni wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In TypeScript declarations,
XMLParser.getMetaDataSymbol()returned the boxedSymbolinterface instead of the primitivesymbol. This prevented its return value from being assigned toPropertyKeyor used directly as an object property key.Additionally, the runtime implementation provides a string fallback (
"@@xmlMetadata") whenSymbolis unavailable in the environment.This PR:
XMLParser.getMetaDataSymbol()insrc/fxp.d.tsandlib/fxp.d.ctstosymbol | string.PropertyKeyassignment check inspec/typings/typings-test.ts.Fixes #890
Signed-off-by: Chirag Bitoni chiragbitoni4994@gmail.com