Skip to content

Commit

Permalink
Update Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoespeon committed Jun 14, 2024
1 parent 65d7a60 commit 2dcd768
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- "Extract Type" can now extract type literals. This is particularly handy when you have such a union type:

```ts
type Context =
| { state: "reading"; value: string }
| {
state: "editing";
value: string;
draftValue: string;
};
```

Put your cursor wherever within `{ state: "reading"; value: string }`, hit Ctrl+Shift+V (⌘ ⇧ V) and there you have it:

```ts
type ReadingContext = { state: "reading"; value: string };

type Context =
| ReadingContext
| {
state: "editing";
value: string;
draftValue: string;
};
```

The `ReadingContext` name was inferred, it it can be. In any case, you are in "rename mode" right away so you can type whatever is better, press Enter, be done.

## [9.2.1]

### Fixed
Expand Down

0 comments on commit 2dcd768

Please sign in to comment.