You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"asstring;
11
+
return"b"asstring;
12
+
}
13
+
14
+
// Now also reported, like `as const` (returns `false`):
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.
iThisruleisstillbeingactivelyworkedon, soitmaybemissingfeaturesorhaveroughedges. Visithttps://github.com/biomejs/biome/issues/9810 for more information or to report possible bugs.
2432
+
2433
+
iThisrulebelongstothenurserygroup, whichmeansitisnotyetstableandmaychangeinthefuture. Visithttps://biomejs.dev/linter/#nursery for more information.
iThisruleisstillbeingactivelyworkedon, soitmaybemissingfeaturesorhaveroughedges. Visithttps://github.com/biomejs/biome/issues/9810 for more information or to report possible bugs.
2454
+
2455
+
iThisrulebelongstothenurserygroup, whichmeansitisnotyetstableandmaychangeinthefuture. Visithttps://biomejs.dev/linter/#nursery for more information.
iThisruleisstillbeingactivelyworkedon, soitmaybemissingfeaturesorhaveroughedges. Visithttps://github.com/biomejs/biome/issues/9810 for more information or to report possible bugs.
2477
+
2478
+
iThisrulebelongstothenurserygroup, whichmeansitisnotyetstableandmaychangeinthefuture. Visithttps://biomejs.dev/linter/#nursery for more information.
iThisruleisstillbeingactivelyworkedon, soitmaybemissingfeaturesorhaveroughedges. Visithttps://github.com/biomejs/biome/issues/9810 for more information or to report possible bugs.
2499
+
2500
+
iThisrulebelongstothenurserygroup, whichmeansitisnotyetstableandmaychangeinthefuture. Visithttps://biomejs.dev/linter/#nursery for more information.
6 │ async function awaitNonCallableThen(): Promise<void> {
26
+
>7 │ await (valueasNotThenable);
27
+
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28
+
8 │ }
29
+
9 │
30
+
31
+
i This may happen if you accidentally used `await` on a synchronous value.
32
+
33
+
i Please ensure the value is not a custom "thenable" implementation before removing the `await`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables
34
+
35
+
i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
0 commit comments