Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new const keyword breaking note #3584

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion docs/release-notes/release-2024-06-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 0.57 - June 2024
---

:::warning
This release contains deprecations
This release contains deprecations and breaking changes
:::

## Values In TypeSpec
Expand Down Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions packages/compiler/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 0.57 - June 2024
---

:::warning
This release contains deprecations
This release contains deprecations and breaking changes
:::

## Values In TypeSpec
Expand Down Expand Up @@ -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
Expand Down
Loading