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
As far as I can tell, there's nothing in the TypeSpec AST that lets me differentiate between TemplateModel<int32> and TemplateModel<int32, string>. In both cases the second argument is considered to be string and there's no simple indication that in one case it was from a default and in the other case it was explicitly specified.
This matters for my use-case because I'm generating functions for templated models (see TomerAberbach/typespec-fast-check#76 if you're curious) and it would be nice to make the emitted function calls (i.e. template instantiations) not unnecessarily emit default arguments that were not specified in the TypeSpec file.
Describe the bug
For example, suppose you have the following:
As far as I can tell, there's nothing in the TypeSpec AST that lets me differentiate between
TemplateModel<int32>
andTemplateModel<int32, string>
. In both cases the second argument is considered to bestring
and there's no simple indication that in one case it was from a default and in the other case it was explicitly specified.This matters for my use-case because I'm generating functions for templated models (see TomerAberbach/typespec-fast-check#76 if you're curious) and it would be nice to make the emitted function calls (i.e. template instantiations) not unnecessarily emit default arguments that were not specified in the TypeSpec file.
Related to #5448.
Reproduction
See above.
Checklist
The text was updated successfully, but these errors were encountered: