[Bug]: There's seemingly no way to see what arguments were actually specified vs defaulted for a template instantiation #5449
Labels
compiler:core
Issues for @typespec/compiler
design:needed
A design request has been raised that needs a proposal
triaged:core
Milestone
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: