TypeScript-DOM-lib-generator
                                
                                 TypeScript-DOM-lib-generator copied to clipboard
                                
                                    TypeScript-DOM-lib-generator copied to clipboard
                            
                            
                            
                        #1261: NodeListOf#item
fixes #1261
NodeListOf#item() misses null in return type
Thanks for the PR!
This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.
Thanks for helping.
You manipulated a generated file.
The correct place would be overridingTypes.jsonc
Oh I see, thanks for the pointer. Will take care.
I think this is intentionally done to follow the current array indexing behavior. Also pinging @orta
I understand that this will not be changed for array index due to the generic behaviour of TS. But it should be done "right" for explicit methods. At least it should be consistent across the interfaces NodeList and NodeListOf. A subtle difference is that array index will return undefined while item returns null.
BTW, how will the new method Array#at behave in TS?
Hrm, yeah, looks like I was a bit gung ho in https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1261
Yeah, .at will/should/does (I've not checked, but that's what we agreed on) have the undefined added in the types but we shouldn't really be switching such a popular DOM API I think (just like we didn't do it to arrays) - those sort of changes aren't really possible at the ecosystem size TS is at nowdays