Azure / Azure/typespec-azure

[Design]: Uptake type declaration expressions in typespec-azure

Open
#4,717 1 comment 0 reactions 1 assignee Claimed by @markcowl View on GitHub
design:needed lib:azure-core lib:azure-resource-manager triaged:core
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

Regarding: https://github.com/microsoft/typespec/pull/11019

The new experimental type expressions feature allows:
- declaring types inline during usage for *most* typespec types (including named unions, enums, scalars)
- decorating type expressions

This presents opportunities for us to simplify the representation of many types and to make library types more efficient, but the feature could also be misused by spec authors and so will require new documentation and new safeguards.

- Changing many type declarations and template declarations in typespec-azure-core and typespec-azure-resource-manager into aliases
- Adding best practice documentation on when top use type expressions
- Alias definitions
- Decorator arguments
- Template Arguments
- Adding linting rules that enforce best practices
- Prevent usage in wire types (until naming is allowed)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.