sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: I wish I could use the same Android emulator setup script as CI
Labels: platform-android,tool,d: api docs,team-infra,P2,c: tech-debt,triaged-infra

Spawned from a Discord discussion with @gmackall:

> Does anyone have a suggestion (i.e. does this themselves) for how I could quasi-programmatically (i.e. on the command-line) create a new Android emulator, locally? I believe on LUCI/CI, we download a text proto describing the emulator configuration, and make one before each shard that uses an emulator.
>
> That leads to behavior like (https://github.com/flutter/flutter/pull/152383#issuecomment-2259323669), where "first time" dialogs are shown. I am working on mitigating those with other ADB configuration, but I'd love an iteration cycle that is local and not "wait 20-50 minutes for our CI".

@gmackall:

> I actually ran into a comment where someone was doing this relatively recently
> https://github.com/flutter/flutter/issues/149328#issuecomment-2145599891
> if your avdmanager isn't on path its probably at ~/Library/Android/sdk/cmdline-tools/latest/bin/avdmanager
> and emulator at ~/Library/Android/sdk/emulator/emulator
> though I guess this is creating the AVD and not the emulator?

My hope is someone else has figured this out already, and we could just document how to also do it.
Repository: go
Issue: cmd/go: TestScript/install_rebuild_removed failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "cmd/go" && test == "TestScript/install_rebuild_removed"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8740888477585594801)):

    === RUN   TestScript/install_rebuild_removed
    === PAUSE TestScript/install_rebuild_removed
    === CONT  TestScript/install_rebuild_removed
        script_test.go:135: 2024-07-31T15:10:16Z
        script_test.go:137: $WORK=C:\Users\swarming\.swarming\w\ir\x\t\cmd-go-test-2381142983\tmpdir3112658193\install_rebuild_removed290995691
        script_test.go:159: 
            PATH=C:\Users\swarming\.swarming\w\ir\x\t\cmd-go-test-2381142983\tmpdir3112658193\testbin;C:\Users\swarming\.swarming\w\ir\x\w\goroot\bin;C:\Users\swarming\.swarming\w\ir\x\w\goroot\bin;C:\Users\swarming\.swarming\w\ir\x\w\goroot\bin;C:\Users\swarming\.swarming\w\ir\cache\tools\bin;C:\Users\swarming\.swarming\w\ir\bbagent_utility_packages;C:\Users\swarming\.swarming\w\ir\bbagent_utility_packages\bin;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages\bin;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages\cpython3;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages\cpython3\bin;C:\Users\swarming\.swarming\w\ir\cache\cipd_client;C:\Users\swarming\.swarming\w\ir\cache\cipd_client\bin;C:\Users\swarming\.swarming\cipd_cache\bin;C:\Python311\Scripts\;C:\Python311\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Users\swarming\AppData\Local\Microsoft\WindowsApps;C:\Users\swarming\.swarming\w\ir\cache\tools\cc\windows\gcc64\bin
            USERPROFILE=/no-home
            CCACHE_DISABLE=1
            GOARCH=arm64
    ...
            # y.go was compiled; removing it should make mypkg stale (0.179s)
            > rm mypkg/y.go
            > stale mypkg
            # go command should detect executable staleness too (3.179s)
            > go install mycmd
            > ! stale mycmd
            > rm mycmd/z.go
            > ! stale mycmd
        script_test.go:159: FAIL: testdata\script\install_rebuild_removed.txt:19: context deadline exceeded
    --- FAIL: TestScript/install_rebuild_removed (4.32s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: storybook
Issue: [Bug]: skip-test and no-tests does not prevent story to be executed in test-runner
Labels: bug,documentation

### Describe the bug

I have some performance/stress stories.
It significantly slow down or cause timeout during CI.

I want to skip them by adding `tags: ['no-tests']` or `skip-test`.
But the story/loaders are still executed.

### Reproduction link

https://stackblitz.com/edit/github-qulsxa-brnno6?file=package.json

### Reproduction steps

Adding `no-tests` or `skip-test` tags and run `test-storybook`

### System

```bash
Storybook Environment Info:

  System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.0.4 - ~/.nvm/versions/node/v20.12.2/bin/pnpm <----- active
  Browsers:
    Chrome: 127.0.6533.74
    Safari: 17.5
```


### Additional context

_No response_
Repository: godot
Issue: Using the RenderingServer to add a texture to the scene, the texture appears at bad position during one frame
Labels: confirmed,good first issue,documentation,topic:physics

### Tested versions

4.3-rc1 Mono Win64

### System information

Windows 11

### Issue description

As said in the title, I use the RenderingServer in order to add texture to the game scene. The problem is that during one frame, the texture appears at wrong position. More precisly, the wrong position is somewhere between the origin (0, 0) and the position it is supposed to be. After this wrong frame, the texture jumps to the expected position.

### Steps to reproduce

Launch the attached project and click in the game scene. You will see the green circle popping at bad position during one frame.

### Minimal reproduction project (MRP)

[BugSpriteJumpingAtInstanciation.zip](https://github.com/user-attachments/files/16446283/BugSpriteJumpingAtInstanciation.zip)
Repository: pytorch
Issue: Support Enum for dictionaries in TorchScript
Labels: oncall: jit

### 🚀 The feature, motivation and pitch

Currently TorchScript does not support using Enums as keys in Dictionaries. 

example 
```
import enum
from dataclasses import dataclass
import torch

class SomeEnum(enum.Enum):
    A = 0

@torch.jit.script
class MyTSClass:
    def __init__(self, my_dict: Dict[SomeEnum, Tensor]):
        self.my_dict = my_dict

```
would fail to compile.

Currently only int, float, complex, Tensor, device and string keys are supported can be used as keys to dictionaries in TorchScript.

### Alternatives

_No response_

### Additional context

_No response_

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
Repository: vscode
Issue: Finalize viewcontainer menu contribution
Labels: feature-request,api,api-finalization

Proposal: https://github.com/microsoft/vscode/issues/200880

Tracking finalizing the `viewContainer/title` menu contribution point.
Repository: godot
Issue: not important bug. enabling and disabling collision shape 2d and ray cast 2d  
Labels: discussion,topic:physics

### Tested versions

v4.2.2.stable.official [15073afe3]

### System information

windows11

### Issue description

so when i want do enable ray cast i have an option enable witch can be turned true o false BUT in collision shape i have option disable witch can be true o false. i dont understand why is it. sometimes it is so confusing. 
![image](https://github.com/user-attachments/assets/787e3ae2-1c4e-49f5-b2e2-870cfac99a45)
![image](https://github.com/user-attachments/assets/3fe4d140-be26-4239-89a9-1051acb9d012)


### Steps to reproduce

create ray cast 2d and collision shape 2d

### Minimal reproduction project (MRP)

[bug.zip](https://github.com/user-attachments/files/16446794/bug.zip)
Repository: godot
Issue: Console bug that appears at random when the "godot official stable" text is printed
Labels: bug,topic:editor

### Tested versions

happened when using godot 4.2 stable, not sure for other versions but im assuming it applies


### System information

Godot v4.2.stable.mono - Windows 10.0.22631 - Vulkan (Mobile) - integrated AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 30.0.13044.0) - AMD Ryzen 3 4300U with Radeon Graphics (4 Threads)

### Issue description

running 2 instances of a project sometimes leads to the initial text printed to break
![image](https://github.com/user-attachments/assets/114ae575-eb2b-4e1b-b2c7-6e129cf74ba2)

this seems to happen at random, with different amounts of changes

![image](https://github.com/user-attachments/assets/97b6ab65-8f89-4fe3-b7fa-403936f6a48d)


### Steps to reproduce

run 2 instances of a project and take a look at the console.

### Minimal reproduction project (MRP)

i dont think its needed
Repository: go
Issue: runtime/pprof: TestEmptyCallStack failures
Labels: NeedsInvestigation,compiler/runtime

```
#!watchflakes
default <- pkg == "runtime/pprof" && test == "TestEmptyCallStack"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8741586813849266577)):

    === RUN   TestEmptyCallStack
    === PAUSE TestEmptyCallStack


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: cmd/go: TestScript/mod_vendor failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "cmd/go" && test == "TestScript/mod_vendor"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8740883541691032737)):

    === RUN   TestScript/mod_vendor
    === PAUSE TestScript/mod_vendor
    === CONT  TestScript/mod_vendor
        script_test.go:135: 2024-07-31T16:42:49Z
        script_test.go:137: $WORK=C:\Users\swarming\.swarming\w\ir\x\t\cmd-go-test-1097857000\tmpdir1670215863\mod_vendor61275530
    go proxy: no archive example.com/deprecated v1.0.0: file does not exist
        script_test.go:159: 
            PATH=C:\Users\swarming\.swarming\w\ir\x\t\cmd-go-test-1097857000\tmpdir1670215863\testbin;C:\Users\swarming\.swarming\w\ir\x\w\goroot\bin;C:\Users\swarming\.swarming\w\ir\x\w\goroot\bin;C:\Users\swarming\.swarming\w\ir\x\w\goroot\bin;C:\Users\swarming\.swarming\w\ir\cache\tools\bin;C:\Users\swarming\.swarming\w\ir\bbagent_utility_packages;C:\Users\swarming\.swarming\w\ir\bbagent_utility_packages\bin;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages\bin;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages\cpython3;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages\cpython3\bin;C:\Users\swarming\.swarming\w\ir\cache\cipd_client;C:\Users\swarming\.swarming\w\ir\cache\cipd_client\bin;C:\Users\swarming\.swarming\cipd_cache\bin;C:\Python311\Scripts\;C:\Python311\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Users\swarming\AppData\Local\Microsoft\WindowsApps;C:\Users\swarming\.swarming\w\ir\cache\tools\cc\windows\gcc64\bin
            USERPROFILE=/no-home
            CCACHE_DISABLE=1
    ...
            > cd ..
            > exists dir1/relative-vendor-dir/modules.txt
            > exists dir1/relative-vendor-dir/a/foo/LICENSE
            > exists dir2/relative-vendor-dir/modules.txt
            > exists dir2/relative-vendor-dir/a/foo/LICENSE
            # 'go mod vendor' should fall back to the default 'vendor' directory when an empty argument is passed to the -o flag
            # the same behavior should be exhibited both on the module root directory, as well as nested subdirectories (0.090s)
            > go mod vendor -v -o ''
        script_test.go:159: FAIL: testdata\script\mod_vendor.txt:108: go mod vendor -v -o : exit status 1
    --- FAIL: TestScript/mod_vendor (3.53s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: cmd/go: TestScript/mod_graph_version failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "cmd/go" && test == "TestScript/mod_graph_version"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8740874888365769313)):

    === RUN   TestScript/mod_graph_version
    === PAUSE TestScript/mod_graph_version
    === CONT  TestScript/mod_graph_version
    go proxy: no archive example.net/b v0.1.0: file does not exist
        script_test.go:135: 2024-07-31T18:53:23Z
        script_test.go:137: $WORK=C:\Users\swarming\.swarming\w\ir\x\t\cmd-go-test-262444390\tmpdir654384114\mod_graph_version1484283771
    go proxy: no archive example.net/c v0.1.0: file does not exist
        script_test.go:159: 
            PATH=C:\Users\swarming\.swarming\w\ir\x\t\cmd-go-test-262444390\tmpdir654384114\testbin;C:\Users\swarming\.swarming\w\ir\x\w\goroot\bin;C:\Users\swarming\.swarming\w\ir\x\w\goroot\bin;C:\Users\swarming\.swarming\w\ir\x\w\goroot\bin;C:\Users\swarming\.swarming\w\ir\cache\tools\bin;C:\Users\swarming\.swarming\w\ir\bbagent_utility_packages;C:\Users\swarming\.swarming\w\ir\bbagent_utility_packages\bin;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages\bin;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages\cpython3;C:\Users\swarming\.swarming\w\ir\cipd_bin_packages\cpython3\bin;C:\Users\swarming\.swarming\w\ir\cache\cipd_client;C:\Users\swarming\.swarming\w\ir\cache\cipd_client\bin;C:\Users\swarming\.swarming\cipd_cache\bin;C:\Python311\Scripts\;C:\Python311\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Users\swarming\AppData\Local\Microsoft\WindowsApps;C:\Users\swarming\.swarming\w\ir\cache\tools\cc\windows\gcc64\bin
            USERPROFILE=/no-home
    ...
            > go mod edit -go=1.16
            > go mod graph
            [stdout]
            example.com/m example.net/lazy@v0.1.0
            example.com/m go@1.16
            example.net/lazy@v0.1.0 example.com/retract/incompatible@v1.0.0
            example.net/lazy@v0.1.0 example.net/requireincompatible@v0.1.0
            example.net/requireincompatible@v0.1.0 example.com/retract/incompatible@v2.0.0+incompatible
        script_test.go:159: FAIL: testdata\script\mod_graph_version.txt:50: go mod graph: exec: canceling Cmd: TerminateProcess: Access is denied.
    --- FAIL: TestScript/mod_graph_version (0.88s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: react
Issue: [React 19] revive `react-test-renderer`
Labels: React 19

## Summary

Ideally `react` is shipped with official test utilities instead of relying o third-party vendors.

Unfortunately it was decided to deprecate`react-test-renderer`.

As a consequence it isn't easy anymore to:
- write unit tests
- test React components independently of the target platform ([React DOM](https://legacy.reactjs.org/docs/react-dom.html), [React Native](https://reactnative.dev/), or any other [**custom renderer**](https://github.com/chentsulin/awesome-react-renderer) which is out there)
- test complex, deeply nested component trees
- shallow render
- make shallow snapshots
- to run tests FAST (in memory)

## Regressions

`@testing-library/react` is an integration testing library, promotes testing anti-patterns and completely ditches unit tests.
It is **slow** and requires a DOM or a mock like `js-dom`.

Please refer to these resources for a comprehensive understanding of why unit tests are of high value:
- https://martinfowler.com/articles/practical-test-pyramid.html#UnitTests

### Other critical voices from the community

- https://javascript.plainenglish.io/in-defense-of-shallow-rendering-5f627f7c155d
- https://blog.hao.dev/my-struggles-with-react-testing-library

## References

> `react-test-renderer` is deprecated. A warning will fire whenever calling `ReactTestRenderer.create()` or `ReactShallowRender.render()`. The `react-test-renderer` package will remain available on NPM but will not be maintained and may break with new React features or changes to React’s internals.
https://react.dev/warnings/react-test-renderer

> `react-test-renderer` is deprecated and no longer maintained. It will be removed in a future version. As of React 19, you will see a console warning when invoking `ReactTestRenderer.create()`.
https://www.npmjs.com/package/react-test-renderer/v/19.0.0-canary-8afa144bd-20240416?activeTab=readme#react-test-renderer-deprecated

**Note:** that affects any code using `react-test-renderer` 
https://github.com/search?q=repo%3Ajestjs%2Fjest%20react-test-renderer&type=code
Repository: rust
Issue: Support for pointers with asm_const
Labels: P-low,T-lang,E-medium,C-feature-request,A-const-eval,F-asm,I-lang-nominated,A-rust-for-linux

Inline assembly supports an unstable feature called asm_const with tracking issue #93332 that lets you pass constants to inline assembly. However, it only supports integer types. This issue is a feature request to support raw pointers with asm_const.

This would enable code such as the following:
```Rust
#![feature(const_refs_to_static)]
#![feature(asm_const)]
use core::arch::asm;
use core::ptr::addr_of;
use core::ffi::c_void;

trait Helper {
    const MY_PTR: *const c_void;
}

fn my_asm_wrapper<T: Helper>() {
    unsafe { asm!("mov {},eax", const T::MY_PTR) };
}


extern "C" {
    static FOO: usize;
}

struct HelperForPassingPointerAsConstGeneric {}
impl Helper for HelperForPassingPointerAsConstGeneric {
    const MY_PTR: *const c_void = addr_of!(FOO).cast();
}

fn main() {
    my_asm_wrapper::<HelperForPassingPointerAsConstGeneric>();
}
```
Currently, the above code would require you to convert `my_asm_wrapper` into a `macro_rules!` so that you can write out the path to the global using the `sym` operand. Supporting this would be useful for the Rust for Linux project, as implementing support for static keys requires a long list of workarounds at the moment.

cc @Amanieu @oli-obk
Repository: pytorch
Issue: [MPS] Memory leak in `nn.Linear`
Labels: high priority,module: memory usage,triaged,module: mps

### 🐛 Describe the bug

Under certain circumstances `nn.Linear` will have memory leaks on MPS. The exact failure mode and condition that leads to leakage is unclear at this moment. I'll give an update when I have more information.

Possibly related to #125217.

### Steps to reproduce

```python
import torch
import torch.nn as nn

N, C, H, W = 64, 32, 256, 256
iters = 5

model = nn.Linear(H, W, device='mps')
input = torch.rand(N, C, H, W, device='mps')

# Warm up
model(input)
torch.mps.empty_cache()

# Begin test
driver_before = torch.mps.driver_allocated_memory()
model(input)
for _ in range(iters):
    model(input)
torch.mps.empty_cache()
driver_after = torch.mps.driver_allocated_memory()

predicted_leak = iters * 4 * N * C * H * W
print(f"{driver_before = }")
print(f"{driver_after = }")
print(f"Detected {driver_after - driver_before} bytes (predicted: {predicted_leak}) leak of GPU memory")
```

#### Example output

```
driver_before = 1102823424
driver_after = 3787177984
Detected 2684354560 bytes (predicted: 2684354560) leak of GPU memory
```

### Versions

PyTorch version: 2.5.0a0+git5406e46
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 14.5 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.3.9.4)
CMake version: version 3.30.1
Libc version: N/A

Python version: 3.8.19 | packaged by conda-forge | (default, Mar 20 2024, 12:49:57)  [Clang 16.0.6 ] (64-bit runtime)
Python platform: macOS-14.5-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Apple M3 Max

Versions of relevant libraries:
[pip3] numpy==1.24.4
[pip3] optree==0.11.0
[pip3] torch==2.5.0a0+git5406e46
[pip3] torchvision==0.20.0a0+61bd547
[conda] numpy                     1.24.4                   pypi_0    pypi
[conda] optree                    0.11.0                   pypi_0    pypi
[conda] torch                     2.5.0a0+git5406e46           dev_0    <develop>
[conda] torchvision               0.20.0a0+61bd547           dev_0    <develop>

cc @ezyang @gchanan @zou3519 @kadeng @msaroufim @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen
Repository: tauri
Issue: [feat] Need js api appWindow.startMoving
Labels: type: feature request

### Describe the problem

Add new api "startMoving" to support more free moving windows.

### Describe the solution you'd like

I want to implement right-click dragging of the window, just like PureRef. but after I call appWindow.startDragging by right-clicking, then I find that I must press the left mouse button before dragging the window. I can't think of any other ways implementate this.
Maybe there is an api called "startMoving", which will immediately make the window follow the mouse position without clicking the mouse.
In addition, this not only allows "right-click dragging", but also allows the window to be dragged at any time, such as pressing a certain button to drag, etc.

### Alternatives considered

_No response_

### Additional context

_No response_
Repository: flutter
Issue: Allow specifying custom Xcode target in `flutter build` and `flutter run`
Labels: c: new feature,platform-ios,tool,t: xcode,c: proposal,a: build,P3,team-ios,triaged-ios

### Use case

I'm developing an iOS App Clip in Flutter and followed the docs here: https://docs.flutter.dev/platform-integration/ios/ios-app-clip. This involves creating a new Xcode target and scheme (called "RunnerAppClip") alongside the main app (called "Runner"). 

I have several `--dart-define`s, so running my RunnerAppClip in Xcode is cumbersome; I would have to base64-encode my `--dart-define`s and update the DART_DEFINES string in Xcode every time I want to build my App Clip. This is cumbersome. 

### Proposal

I'd like to be able to run `flutter build ipa --xcode-target=Runner` and `flutter build ipa --xcode-target=RunnerAppClip`. This feature is similar to flavors, but should allow specifying a custom Xcode target, not just an Xcode scheme.
Repository: TypeScript
Issue: Type predicate for an optional property is not inferred
Labels: Suggestion,Awaiting More Feedback

### 🔎 Search Terms

inferred type predicate optional

### 🕗 Version & Regression Information

- This changed between versions 5.4 and 5.5


### ⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.5.4#code/C4TwDgpgBA8gRgKygXigbwPZmASwwOwEMAbAfgC51DL8BXAWzggCcBfVgKFElkQCYU6LLgIkKUWvgAmEAGY58EKaygAfIdjxFilNNSh1GLdh1OzJAYxH4oOAM4xNo4gBE5CpQAoIleAgCU6BwA9MFQ4RFQAHqkHJHMEMC0zDYQAHTCWiRQAITIqJIy8opSHJwc5vhWWrYOTtpuxUp83r78gWghYTFxEQlJKVDpmc65+RLS7iVlHEA

### 💻 Code
```ts
type Obj = {optional?: {a: number}}

function isOptionalDefined(e: Obj) {
    return e.optional !== undefined
}

if (isOptionalDefined(someObj) {
  someObj.optional.a // 'someObj.optional' is possibly 'undefined'
}
```

### 🙁 Actual behavior

If a type contains an optional property, and I write a function that ensures the property is defined, the function is not inferred as a type predicate. No type narrowing happens when I use this function.

At the same time, if I rewrite the original type to be itself a union, then the type predicate is inferred, as expected.

### 🙂 Expected behavior

Type predicate is inferred

### Additional information about the issue

I feel it has something to do with https://github.com/microsoft/TypeScript/issues/55257, but I'm not sure.