Skip to content

The array type is not recognized correctly in template model #2372

@chunyu3

Description

@chunyu3

In a template model, when we define an property whose type is an array of the templated model, e.g.

model NumericValuesFacet<T extends numeric> extends Facet {
  @doc("The facet ranges to produce. The values must be listed in ascending order to get the expected results. For example, values=10,20 produces three buckets: one for base rate 0 up to but not including 10, one for 10 up to but not including 20, and one for 20 and higher.")
  values: T[];
}

The typespec compiler does not recognize it as an array, Following is the return from compiler, it is not array as expected
image

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions