0.55 - April 2024
Deprecations
Section titled “Deprecations”@typespec/compiler
Section titled “@typespec/compiler”-
#2910 Deprecate
@projectedName
decorator.@encodedName
should be used instead.Example:
@projectedName("json", "exp")@encodedName("application/json", "exp") -
#3094 Deprecate
@knownValues
decorator. Use a named union of string literal with a string variant to achieve the same result without a decoratorExample:
enum FooKV { a, b, c}@knownValues(FooKV)scalar foo extends string;union Foo { "a", "b", "c", string }
Features
Section titled “Features”@typespec/compiler
Section titled “@typespec/compiler”- #2992 Enable the use of
@encode
for model properties that have a union type. This supports cases like@encode("rfc3339") prop: utcDateTime | null
@typespec/versioning
Section titled “@typespec/versioning”- #3053 Add support for versioning of scalars(Added, removed, renamed)
Bug Fixes
Section titled “Bug Fixes”@typespec/compiler
Section titled “@typespec/compiler”- #3018 Grammar: Fix comments in template params not tokenized
- #3052 Fix: Union template declaration were incorrectly being finished in projection
- #2983 Warnings converted to error with
warn-as-error
do not prevent compilation from moving to the next stage like regular warnings - #3041 Improve reliability of application of codefixes in IDE, often it would not do anything
- #3069 TmLanguage: Fix tokenization of escaped identifiers, enums and unions
@typespec/openapi3
Section titled “@typespec/openapi3”- #3077 Do not crash if using an unsupported intrinsic type
- #2967 Fix crash: emit
{nullable: true}
when trying to emitnull
in openapi3 - #3013 Fix: OpenAPI3 not marking part of bytes or something else as
format: binary
- #3090 Fix: Literal unions with the same variants keep adding duplicate entries
- #3049 Fix visibility naming conflict when a model used with
extends
was used in different visibility.
@typespec/eslint-config-typespec
Section titled “@typespec/eslint-config-typespec”- #2122 Ignore
generated-defs
folder