fix: add missing children field to DocumentSymbol TypedDict

The LSP v3.17 spec defines DocumentSymbol.children as an optional list
of nested DocumentSymbol entries. The field was absent from the TypedDict,
causing type checkers to flag access to 'children' on DocumentSymbol
objects and requiring # type: ignore workarounds in ls.py.
This commit is contained in:
KoushikReddy committed 2026-04-18 09:27:06 -07:00
1 parent fc392a4fb8
commit ed63068045
1 file changed
+2 -2
@@ -2456,8 +2456,8 @@ class DocumentSymbol(TypedDict):
selectionRange: "Range"
""" The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
Must be contained by the `range`. """
# TODO: I think this type is missing the 'children' field - DJ
children: NotRequired[list["DocumentSymbol"]]
""" Children of this symbol, e.g. properties of a class. """
class DocumentSymbolRegistrationOptions(TypedDict):