You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to MutationObserver MDN docs, calling .observe() without an options argument will throw a type error.
The docs for the options type MutationObserverInit state that:
At a minimum, one of childList, attributes, and/or characterData must be true when you call observe(). Otherwise, a TypeError exception will be thrown.
However, all of childList, attributes & characterData are false by default, including when an options argument is not provided. Therefore i believe that the secondary argument for observe() being optional is incorrect.
The text was updated successfully, but these errors were encountered:
Yep, Typescript marks the MutationObserver observe method signature as MutationObserver.observe(target: Node, options?: MutationObserverInit): void. Calling it without an options object doesn't give you a static error, but you'll get a runtime type error as it isn't optional. At least one of the properties needs to be passed in as true.
According to MutationObserver MDN docs, calling
.observe()
without an options argument will throw a type error.The docs for the options type MutationObserverInit state that:
However, all of childList, attributes & characterData are false by default, including when an options argument is not provided. Therefore i believe that the secondary argument for observe() being optional is incorrect.
The text was updated successfully, but these errors were encountered: