It's technically possible to pass PutOptions into Publisher::put() which actually expects it's subset PublisherPutOptions. Typescript type system doesn't catch it: extra fields are just silently ignored.
This may cause wrong expectations. E.g. without consulting to documentation user may suppose that he can change priority or congestion control for individual put operation in publisher. The problem is amplified by using AI for code generation.
The solution is to improve zenoh-ts API by adding compile-time branding for "options" structures which will block misusing these structures when types are not exactly match.
It's technically possible to pass
PutOptionsintoPublisher::put()which actually expects it's subsetPublisherPutOptions. Typescript type system doesn't catch it: extra fields are just silently ignored.This may cause wrong expectations. E.g. without consulting to documentation user may suppose that he can change priority or congestion control for individual
putoperation in publisher. The problem is amplified by using AI for code generation.The solution is to improve zenoh-ts API by adding compile-time branding for "options" structures which will block misusing these structures when types are not exactly match.