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
{{ message }}
Repository navigation
Update lib.dom.d.ts: MutationObserverInit.attributeFilter can accept an iterator #55990
MutationObserverInit.attributeFilter is currently declared as string[], but the platform accepts an iterable of strings. In Edge 153.0.4234.32, Set<string>.keys() is accepted and filters both requested attributes. TypeScript 5.2.2 and current native 7.1.0-dev.20260918.1 both report TS2740 because the iterator is not assignable to string[].
This concise code demonstrates the mismatch:
constnames=newSet<string>();// Expected: MutationObserverInit.attributeFilter accepts a Set<string>.keys() iterator.// Actual: TypeScript rejects the iterator with TS2740.constoptions: MutationObserverInit={attributeFilter: names.keys()};
The DOM specification defines attributeFilter as a sequence of DOM strings, whose Web IDL conversion accepts iterables. The declaration should model that accepted iterable input.
Activity
RyanCavanaugh commentedon Sep 19, 2026
MutationObserverInit.attributeFilteris currently declared asstring[], but the platform accepts an iterable of strings. In Edge 153.0.4234.32,Set<string>.keys()is accepted and filters both requested attributes. TypeScript 5.2.2 and current native 7.1.0-dev.20260918.1 both report TS2740 because the iterator is not assignable tostring[].This concise code demonstrates the mismatch:
The DOM specification defines
attributeFilteras a sequence of DOM strings, whose Web IDL conversion accepts iterables. The declaration should model that accepted iterable input.