AshTypescript.Codegen.SortTypes (ash_typescript v0.18.2)

Copy Markdown View Source

Generates TypeScript sort field as const arrays and derived union types for Ash resources.

Each resource gets:

  • {resourceName}SortFields — a runtime as const array of sortable field names
  • {ResourceName}SortField — a union type derived from the array

Sortable fields are driven by Ash.Info.Manifest: any field whose sortable? is true is included, formatted for the client (e.g. camelCase).

Summary

Functions

generate_sort_type(resource)

generate_sort_type(resource, resource_lookup)

generate_sort_types(resources)

generate_sort_types(resources, resource_lookup)