You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say you have a decorator with two optional string parameters:
extern dec test(target: unknown, arg1?: string, arg2?: string);
How do you pass arg2 without passing arg1? @test(null, "hello") doesn't compile and shouldn't compile and even if it did, it would be observably different to the JS implementation than the undefined value it gets when the optional args are not passed at all. Do we need undefined in TypeSpec? I have long hoped we didn't but this seems like a gap.
The text was updated successfully, but these errors were encountered:
Say you have a decorator with two optional string parameters:
extern dec test(target: unknown, arg1?: string, arg2?: string);
How do you pass arg2 without passing arg1?
@test(null, "hello")
doesn't compile and shouldn't compile and even if it did, it would be observably different to the JS implementation than theundefined
value it gets when the optional args are not passed at all. Do we needundefined
in TypeSpec? I have long hoped we didn't but this seems like a gap.The text was updated successfully, but these errors were encountered: