null
from optional types conflicts with null
as addr_none
in TS wrappers
#1198
Labels
discussion
Ideas that are not fully formed and require discussion
scope: ts-wrappers
TypeScript wrappers for Sandbox tests
Currently, optional types are described as nullable ones (e.g.
boolean | null
), which is fine for all types exceptAddress
.@ton/core
handles addresses in such way thatnull
meansaddr_none
, and it was implemented in Tact in a similar way due to the original developer being the same person who made the library.We want to rework addresses (#1119) for consistency and predictability, but
null
s prevent us from doing so without refactoring either the ton-core library itself or generated TS wrappers for Tact contracts. Current maintainer of the library suggested the second option.More precisely, we can make some type wrapper for
Maybe
that will be used instead of the| null
thing to supportnull
as a value itself. This will potentially resolve the problem and allow us to describeMaybe MsgAddress
type which will look likeMaybe<Address | ExternalAddress | null>
.What do you think? @anton-trunov @verytactical
The text was updated successfully, but these errors were encountered: