Change the typedefs and docs for updateTag to match how FXP actually behaves #579
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.
Purpose / Goal
According to the comments in discussion #576 the
updateTag
method actually allows for theundefined
return type. This PR makes two simple changes:Type
Regarding the typedefs update
Currently returning
undefined
while using typescript will give this errorThe update the the typedefs will fix this and allow this to happen.
Regarding the docs update
A note about the example output in the docs that I added. This is the exact output when I tested it by running the code example given in the docs. It seems to say that
"At": "Home"
is added as an attribute on theA
tag, but also"At": "Home"
seems to be added as an element. This seems odd to me but I'm also somewhat new to FXP and I'm not sure if this is intended behavior or not. Regardless though, this is what the output is, and now the docs will give an example of that.##Regarding returning
undefined
As far as I can tell when
updateTag
method hasreturn undefined
, it behaves exactly the same asreturn false
. The docs and the typedefs now explicitly mention that.