Background
Currently, we register nullable types in Embind using custom type definitions that map to 'T | null' in TypeScript. For example:
FilteredLogEventMapTsType -> number[] | null
LogEventIdxTsType -> number | null
Embind now provides built-in support for std::optional<T> through the register_optional() function, as documented here.
Proposed Changes
Convert all nullable type registrations to use std::optional<T> with register_optional().
References