Closed lmazuel closed 1 month ago
Proposed changed signature for decorator
extern dec encode( target: Scalar | ModelProperty, encoding: string | EnumMember, encodedAs?: Scalar ); extern dec encode2(target: Scalar | ModelProperty, encodedAs: Scalar); extern dec encode2( target: Scalar | ModelProperty, encodingOrEncodedAs: string | EnumMember | Scalar, encodedAs?: Scalar );
And then you can call
@encode(string) val: int64
restrict this overload format to only numeric scalar types and string as the encodeAs
string
Changes:
Would also be good to decide if string is the right key.
Similar issue with https://github.com/microsoft/typespec/issues/2762
Proposed changed signature for decorator
And then you can call
restrict this overload format to only numeric scalar types and
string
as the encodeAsChanges: