Skip to content

Commit 04ee32c

Browse files
committed
chore: add changesets
1 parent 77e9512 commit 04ee32c

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.changeset/curly-pillows-attack.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"@biomejs/biome": patch
3+
---
4+
5+
Fixed [`noMisleadingReturnType`](https://biomejs.dev/linter/rules/no-misleading-return-type/) false positive on returns that use a widening type assertion: `"a" as string` is no longer reported as misleading. The rule now also reports a literal-pinning assertion such as `false as false`, matching the existing `as const` behavior.
6+
7+
```ts
8+
// No longer flagged (returns are `string`):
9+
function getValue(b: boolean): string {
10+
if (b) return "a" as string;
11+
return "b" as string;
12+
}
13+
14+
// Now also reported, like `as const` (returns `false`):
15+
function isReady(): boolean {
16+
return false as false;
17+
}
18+
```
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@biomejs/biome": patch
3+
---
4+
5+
Fixed [`useAwaitThenable`](https://biomejs.dev/linter/rules/use-await-thenable/) false positive when awaiting a custom thenable that is not the global `Promise`. A value with a callable `then` member is now recognized as awaitable.
6+
7+
```ts
8+
interface Thenable<T> { then(onfulfilled: (value: T) => void): void; }
9+
declare const t: Thenable<number>;
10+
async function f() {
11+
await t;
12+
}
13+
```

0 commit comments

Comments
 (0)