diff --git a/docs/release-notes/release-2024-06-10.md b/docs/release-notes/release-2024-06-10.md index 5e37300aee..e709eb902b 100644 --- a/docs/release-notes/release-2024-06-10.md +++ b/docs/release-notes/release-2024-06-10.md @@ -3,7 +3,7 @@ title: 0.57 - June 2024 --- :::warning -This release contains deprecations +This release contains deprecations and breaking changes ::: ## Values In TypeSpec @@ -51,6 +51,21 @@ const ip: ipV4 = ipV4.fromInt(3232235776); [See values doc for more info](https://typespec.io/docs/language-basics/values) +## Breaking changes + +- [#3022](https://github.com/microsoft/typespec/pull/3022) Addition of new `const` keyword means using `const` as a property name or decorator name will result in an error. This can be fixed by wrapping the property in backtick. + +```tsp +model Test { + // error + const: string; + + // correct + `const`: string; + +} +``` + ## Deprecations ### @typespec/compiler diff --git a/packages/compiler/CHANGELOG.md b/packages/compiler/CHANGELOG.md index ae3b417513..6772d6c83e 100644 --- a/packages/compiler/CHANGELOG.md +++ b/packages/compiler/CHANGELOG.md @@ -2,6 +2,22 @@ ## 0.57.0 + +### Breaking changes + +- [#3022](https://github.com/microsoft/typespec/pull/3022) Addition of new `const` keyword means using `const` as a property name or decorator name will result in an error. This can be fixed by wrapping the property in backtick. + +```tsp +model Test { + // error + const: string; + + // correct + `const`: string; + +} +``` + ### Bug Fixes - [#3399](https://github.com/microsoft/typespec/pull/3399) Preserve leading whitespace in fenced blocks in doc comments diff --git a/packages/website/versioned_docs/version-latest/release-notes/release-2024-06-10.md b/packages/website/versioned_docs/version-latest/release-notes/release-2024-06-10.md index 5e37300aee..e709eb902b 100644 --- a/packages/website/versioned_docs/version-latest/release-notes/release-2024-06-10.md +++ b/packages/website/versioned_docs/version-latest/release-notes/release-2024-06-10.md @@ -3,7 +3,7 @@ title: 0.57 - June 2024 --- :::warning -This release contains deprecations +This release contains deprecations and breaking changes ::: ## Values In TypeSpec @@ -51,6 +51,21 @@ const ip: ipV4 = ipV4.fromInt(3232235776); [See values doc for more info](https://typespec.io/docs/language-basics/values) +## Breaking changes + +- [#3022](https://github.com/microsoft/typespec/pull/3022) Addition of new `const` keyword means using `const` as a property name or decorator name will result in an error. This can be fixed by wrapping the property in backtick. + +```tsp +model Test { + // error + const: string; + + // correct + `const`: string; + +} +``` + ## Deprecations ### @typespec/compiler