sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: please alias jsdoc doc comments to variable assignments
Labels: Suggestion,Awaiting More Feedback

# Suggestion


## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

typescript alias jsdoc to variable assignment


## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

Please copy JSDoc data to aliased variables.

## 📃 Motivating Example

```ts
/** Call this in order to something. */
const foo = (s: string): number => 123

const f = foo

f // hovering on 'f' does not show the documentation description "Call this in order to something."
```

[playground](https://www.typescriptlang.org/play?#code/PQKhAIGEEMBtfAFwBYEsDO5UDtwHsAnAEwFMCk9x08BbElHAcwDpwRgAoAYz23UXAAzPJQC84ABToAXFUQEmASlnYArjQBGZcKIB84AIwAmAMwduvfkJ1CR5weGDBwyPADcyTfLgDkgn+BEeCSY2HgC6K4A7kjIJIF4XOok2IjQiKi8gSFcCgAOGVkARDDwsRhYuISk5IiU1HQM2CxFQA)


## 💻 Use Cases

Make documentation easier. All projects need good documentation!

## Workaround:

an author can copy/paste duplicate JSDoc comments. This is harder to maintain.
Repository: TypeScript
Issue: Generator function polyfill makes an inconsistent output
Labels: Bug

# Bug Report

### 🔎 Search Terms

generator function that uses arguments

### 🕗 Version & Regression Information

- This is the behavior in every version I tried.

### ⏯ Playground Link

[Generator function to ES5](https://www.typescriptlang.org/zh/play?strict=false&noImplicitAny=false&strictNullChecks=false&strictFunctionTypes=false&strictPropertyInitialization=false&strictBindCallApply=false&noImplicitThis=false&declaration=false&target=1&ts=4.7.4&filetype=ts#code/GYVwdgxgLglg9mABAKkcAFASkQbwFCKGICeMApgDYAmiAhgE4DmIAtmWFAM54C+eeEBJzgUyAOgpxG6DAEZMYsGQAeULJgDcQA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
function * f() {
    yield arguments
}

console.log(f(1).next());
```

### 🙁 Actual behavior
running output

```json
{
  "value": {
    "0": {
      "label": 1,
      "trys": [],
      "ops": []
    }
  },
  "done": false
} 
```
### 🙂 Expected behavior
running output

```json
{
  "value": {
    "0": 1
  },
  "done": false
} 
```
Repository: pytorch
Issue: Wrong example of sliced computation in doc page Numerical Accuracy
Labels: module: docs,triaged,module: numerical-reproducibility

### 📚 The doc issue

This issue is related to the page [Numerical Accuracy](https://pytorch.org/docs/stable/notes/numerical_accuracy.html#batched-computations-or-slice-computations)
(Accessed July 6 2022)
(The source of the page in the repository is [here](https://github.com/pytorch/pytorch/blob/master/docs/source/notes/numerical_accuracy.rst#batched-computations-or-slice-computations). But I'm not sure which commit).

Quote from the page:

> let `A` be a 2-dimentional tensor. `A.sum(-1)[0]` is not guaranteed to be bitwise equal to `A[:,0].sum()`.

Viewing `A` as a matrix, notice that `A.sum(-1)[0]` is the sum of the first row, whereas `A[:,0].sum()` is the sum of the first column. These are trivially different, and this difference is not related to numerical accuracy.

See for example:
```python
import torch
A = torch.ones(4,5)
x = A.sum(-1)[0] # equals 5
y = A[:,0].sum() # equals 4
```

I suspect that the intention in this example was either to use `A.sum(0)[0]` for the first calculation or `A[0].sum()` for the second.

### Suggest a potential alternative/fix

I believe that this sentence: 
> `A.sum(-1)[0]` is not guaranteed to be bitwise equal to `A[:,0].sum()`.

should be replaced with one of the following:
> `A.sum(0)[0]` is not guaranteed to be bitwise equal to `A[:,0].sum()`.

> `A.sum(-1)[0]` is not guaranteed to be bitwise equal to `A[0].sum()`.

(which one? depends on the numerical accuracy issue here...)

cc @svekars @holly1238
Repository: flutter
Issue: How do we simulate text editing deltas?
Labels: a: tests,a: text input,framework,P3,team-framework,triaged-framework

I'm working on an IME simulator so that developers can test against delta-based text editing in widget tests.

I think we may be missing an important tool to make this happen. Please let me know if I'm missing something.

To send a delta, we must send the current text, called `oldText`. We also need to know the current selection to determine what some of the delta values should be. How do we obtain this information so that we can assemble a delta?

**Options:**

1. Implement an entire IME in Dart. This is a huge undertaking and I don't think it should be necessary.
2. Wrap the existing channel handler with a custom handler and intercept the messages about selection and text. I don't see any way to do this because I don't see how to get a reference to the current channel handler, which means I can't wrap the current channel handler with my own decorator.
3. Use a `Finder` to locate a widget that implements `DeltaTextInputClient` and query the information. This approach works. However, in `SuperTextField` we don't implement `DeltaTextInputClient` on a `State` object. Instead, we implement that API in our `ImeAttributedTextEditingController`. As a result, no `Finder` will ever find that controller.
4. Globally access the current text input connection, get a reference to the current client, and query the `currentTextEditingValue`. This isn't possible because there is no public access to the global input connection. It exists statically, but those references are private.

So in our test tooling, how can we assemble appropriate deltas when sending them through the system channel, as if we were the platform?
Repository: godot
Issue: apksigner error only through Steam
Labels: platform:android,topic:editor,needs testing,topic:export

### Godot version

3.4.4.stable [419e713a2]

### System information

Linux Mint 20.3 Una

### Issue description

Trying to export an apk comes up with the error message `'apksigner' returned with error #1` when I launch Godot through Steam. But if I open the same Godot from the console the export is successful.

### Steps to reproduce

1. Install and launch Godot through Steam
3. Follow the [official guide](https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_android.html) for exporting to Android
4. Try to export the project

### Minimal reproduction project

This error comes up on a default new project
Repository: TypeScript
Issue: JSDoc ...rest parameter syntax cannot support tuple types
Labels: Suggestion,Experimentation Needed

# Bug Report

### 🔎 Search Terms

jsdoc rest tuple

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about *JSDoc*

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?filetype=js#code/PQKhCgAIUgBBjAhgG2QI0fA1pAwgIQDEBXAO3gBcBLAe1KhlgAdEAnRAW0gG9TiO0AU1YBfSPWhwW7LtwDOFVlVIBzMXIbBw4YMEgARQXKqtBAE0g1iFeDQ6CAXDr0UAnk3OCAZnny4UyMKQALyQABQAdFFsKnIOkAAKbJyCFMJyADwEJOTUdAB8AJQh+ZAAbjRUZtqgEJLMybJREUkyqelZRGSUtKT5YjEa0Fpe3XmkkF6R0ayxxdxQkLakcjSBEcg0KmGDhQDc4CLgQA)

### 💻 Code

```js
/**
 * @callback CBFunction
 * @param {number} n
 * @param {string} s
 */

// Desired outcome:
// typedef CBCaller = (...args: Parameters<CBFunction>) => void

/**
 * @param {...Parameters<CBFunction>} args
 */
function f(...args) {
  console.log(args);
}
```


### 🙁 Actual behavior

See Playground link: on `.d.ts` tab, the output is `declare function f(...args: [number, string][]): void;`, an array-of-tuples.  Generally, JSDoc syntax treats `{...X} args` as `args: X[]`.

### 🙂 Expected behavior

TS-flavored JSDoc should be able to express any type that TS can express.
Repository: TypeScript
Issue: Mention --strictFunctionTypes and method/constructor exclusions in FAQ
Labels: Docs

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

strictFunctionTypes bivariant interface FAQ

## ✅ Viability Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

There are a good number of issues related to function parameter bivariance as `--strictFunctionTypes` does not apply to methods and constructors. Yet the FAQ doesn't mention the opton or exception. It is hard to know if some bits of information are out of date without blame or some kind of freshness attribute. [Wiki - FAQ - Why are function parameters bivariant?](https://github.com/Microsoft/TypeScript/wiki/FAQ#why-are-function-parameters-bivariant) looks like it wouldn't apply once `--strictFunctionTypes` is enabled but it will and noting that would be helpful. 

## 📃 Motivating Example

As an experience developer I spent hours reading on this topic and reading through issues. Even was composing a new issue before going backing and reading more to ultimately connect all of the pieces.

## 💻 Use Cases

Get people to the complete knowledge they need faster.
Repository: godot
Issue: Cant see subdictionaries while debugging
Labels: bug,topic:editor

### Godot version

v3.5.rc5.official [ae6059793]

### System information

manjaro linux

### Issue description

When I try to look the subvalues of a dictionary, especifically dictionary inside dictionary!


https://user-images.githubusercontent.com/58845030/177542186-e8cea80d-4025-4513-a8d0-4fc78b7a029a.mp4



### Steps to reproduce

* Create a script
* Create a dictionary -> `var dict := {}`
* under the ready function, create a subdictionary -> `dict["test"] = {number=1}`
* place a breakpoint
* try to look at the value in the editor

### Minimal reproduction project

N/a
Repository: pytorch
Issue: ExpandedWeights sometimes fail silently and doesn't compute .grad_sample attribute
Labels: module: nn,triaged

### 🐛 Describe the bug

Normally `call_for_per_sample_grads` detects inputs where it can't compute per sample gradients and throws user-friendly exception with the explanation.
However, in some scenarios (see below) it just skips certain parameters and doesn't do anything with them. As such, after the backward pass some parameters would have only `.grad_sample` attribute, and some - only `.grad` attribute. All this happens silently to the user and the user would only notice the issue when they try to access `.grad_sample` attribute.

I haven't done a detailed investigation as to when this occurs, but it might have something to do with recurrent nets. Below is the example using opacus custom-written RNN implementation.

```python
import torch
import torch.nn as nn
from torch.nn.utils._per_sample_grad import call_for_per_sample_grads

from opacus.layers import DPRNN

N=1
T=1
D=4
H=8
num_layers=1
bias=False
batch_first=True
bidirectional=False
using_packed_sequences=False
packed_sequences_sorted=False

rnn = DPRNN(
    D,
    H,
    num_layers=num_layers,
    batch_first=batch_first,
    bias=bias,
    bidirectional=bidirectional,
)
x = torch.randn([N, T, D])

# out, _ = rnn(x)
out, _ = call_for_per_sample_grads(rnn, x.shape[0], x)
out.sum().backward()

rnn.l0.ih.weight.grad_sample
```

Error
```
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/var/folders/_r/hzffvgfd23sc3w0gr577_qmc0000gn/T/ipykernel_71302/2553106598.py in <module>
     26 out.sum().backward()
     27 
---> 28 rnn.l0.ih.weight.grad_sample

AttributeError: 'Parameter' object has no attribute 'grad_sample'
```

### Versions

PyTorch version: 1.12.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.4 (x86_64)
GCC version: Could not collect
Clang version: 12.0.5 (clang-1205.0.22.9)
CMake version: Could not collect
Libc version: N/A

Python version: 3.7.5 (default, Oct 22 2019, 10:35:10)  [Clang 10.0.1 (clang-1001.0.46.4)] (64-bit runtime)
Python platform: Darwin-21.5.0-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
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

Versions of relevant libraries:
[pip3] mypy==0.910
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.4
[pip3] pytorch-lightning==1.5.3
[pip3] torch==1.12.0
[pip3] torchaudio==0.12.0
[pip3] torchmetrics==0.6.0
[pip3] torchvision==0.13.0
[conda] Could not collect

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are
Repository: vscode
Issue: Menu appears below quick pick
Labels: bug,under-discussion,menus

Repro:

1. Open test resolver
2. Run open folder command
3. Try open a menu

![image](https://user-images.githubusercontent.com/2193314/177551437-70d970b8-5c8e-4119-9428-3dce8c4da7d1.png)
![image](https://user-images.githubusercontent.com/2193314/177551485-5af464b7-58e9-4226-afab-673c2e4f31ae.png)
Repository: flutter
Issue: Marker - Long press actions
Labels: c: new feature,p: maps,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case
I have a map with markers on them.  When you tap them I want to move you to a new screen showing you information about events that happened there.  I also want people to be able to edit the details of the marker (i.e. the name, the position, and other attributes about the location) that are not present on the events screen.  Currently, I have to have the user change the mode of the map to change the on-tap behavior.  I want to expose the edit functionality through a long-press action on the location pin rather than having the user change map modes.

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal
I propose you add a "onLongPress" to the Marker constructor that responds with those events.

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching something showing what you are imagining:
      * images
      * videos
      * code samples

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: axios
Issue: Axios Interceptor Object is of type unknown
Labels: state::triage

#### Can not access `data` inside `AxiosError`
Whenever I try to access `data` or `status` property off `AxiosError` object i get Object of type is unknown by typescript

#### To Reproduce
https://codesandbox.io/s/peaceful-varahamihira-y35uz7?file=/src/index.ts

```
export const api = axios.create({});

export const errorInterceptor = (axiosError: AxiosError) => {
  const { response } = axiosError;
  console.log(response.status); // object is of type unknown
  console.log(response.data); // object is of type unknown
};
api.interceptors.response.use(() => void 0, errorInterceptor);
```

#### Expected behavior
I should be able to access `data` and `status` property of `AxiosError` without any warning from typescript

#### Environment
 - Axios Version [e.g. 0.27.2]
 - Chrome
 - Browser Version 102
Repository: svelte
Issue: A rotated element's crossfade animation goes in wrong direction
Labels: transition/animation

### Describe the bug

An element with a css transform rotation will move in the wrong direction when transitioning using `crossfade`.
The result is that the illusion (of one element moving from one place to the other) breaks, and instead it looks like two separate elements appearing from and disappearing into different locations.

I love the `crossfade` feature :heart:. I'll just have to avoid using it with rotated elements until this is fixed.

### Reproduction

https://svelte.dev/repl/7683202144db47858ab63591919ae131?version=3.48.0

By removing the rotation from the css transform, everything looks normal again:
https://svelte.dev/repl/19da212e1b9446338b05ab73091d1cee?version=3.48.0

### Logs

_No response_

### System Info

```shell
Svelte 3.48.0
```


### Severity

annoyance
Repository: go
Issue: x/tools/gopls: crash when go.work file is identified by the client as a go.mod file
Labels: gopls,Tools,gopls/workspace

gopls version: v0.8.4
gopls flags: 
update flags: proxy
extension version: 0.29.0
go version: 1.18.1
environment: code-server linux
initialization error: undefined
issue timestamp: Wed, 06 Jul 2022 07:10:29 GMT
restart history:
Wed, 06 Jul 2022 07:09:30 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

<ANSWER HERE>

<pre>panic: interface conversion: interface {} is *cache.parseWorkData, not *cache.parseModData

goroutine 214 [running]:
golang.org/x/tools/internal/lsp/cache.(*parseModHandle).parse(0x842280%3F, {0xbab180%3F, 0x4000492b00%3F}, 0x44%3F)
	  mod.go:42  0x98
golang.org/x/tools/internal/lsp/cache.(*snapshot).ParseMod(0x40002938c0, {0xbab180, 0x4000492b00}, {0xbab4c8, 0x4000209aa0})
	  mod.go:101  0x270
golang.org/x/tools/internal/lsp.modLinks({0xbab180, 0x4000492b00}, {0xbb3868, 0x40002938c0}, {0xbab4c8%3F, 0x4000209aa0%3F})
	  link.go:48  0x60
golang.org/x/tools/internal/lsp.(*Server).documentLink(0x4000740ea0%3F, {0xbab180, 0x4000492b00}, 0x400079a630%3F)
	  link.go:35  0xfc
golang.org/x/tools/internal/lsp.(*Server).DocumentLink(0x400082c300%3F, {0xbab180%3F, 0x4000492b00%3F}, 0x7ea2a0%3F)
	  server_gen.go:120  0x28
golang.org/x/tools/internal/lsp/protocol.serverDispatch({0xbab180, 0x4000492b00}, {0xbb6fe0, 0x40004ce6c0}, 0x4000740e70, {0xbab420, 0x4000492a00})
	  tsserver.go:677  0x2468
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1({0xbab180, 0x4000492b00}, 0x4000740e70, {0xbab420, 0x4000492a00})
	  protocol.go:157  0x70
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1({0xbab180, 0x4000492b00}, 0x4000740e70, {0xbab420%3F, 0x4000492a00%3F})
	  lsprpc.go:511  0x7d4
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0xbab180, 0x4000492b00}, 0x4000206a38, {0xbab420%3F, 0x4000492a00%3F})
	  handler.go:35  0xfc
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2()
	  handler.go:103  0x90
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	  handler.go:100  0x1ec
[Error - 7:10:13 AM] </pre>

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.

<OPTIONAL: ATTACH LOGS HERE>
Repository: rust
Issue: Autogenerate man pages
Labels: A-docs

Right now the man pages need to be manually updated, which in practice means they're almost never updated. We should find a way to autogenerate these if we want them to be accurate.

_Originally posted by @jyn514 in https://github.com/rust-lang/rust/pull/98975#issuecomment-1176237275_
Repository: deno
Issue: Runtime references deno-specific flag in error log
Labels: suggestion,runtime,custom runtime

When using `deno_runtime` and calling `execute_main_module`, the function will return an error if it is lacking permissions to access external IO, when printing this error it will look something like this:

```
Error: Requires write access to "./duplicates.txt", run again with the --allow-write flag
```

The issue with this is that the `--allow-write` flag is specific to Deno's CLI and thus might confuse users when `deno_runtime` is embedded in another application.

I've tried to work around this by using [`get_custom_error_class`](https://docs.rs/deno_core/0.142.0/deno_core/error/fn.get_custom_error_class.html) and checking if it is `Some("PermissionDenied")`, which it should be according to [the source code](https://github.com/denoland/deno/blob/main/runtime/permissions.rs#L71-L78). However this always returns `None`, despite the error being created through `custom_error`, so I'm not sure that function is working properly?
Repository: material-ui
Issue: Better documentation about `styled` API
Labels: docs,package: system

```jsx
const StyledSlider = styled(Slider, {
  shouldForwardProp: (prop) => prop !== 'success',
})<StyledSliderProps>(({ success, theme }) => ({
  ...(success &&
    {
      // the overrides added when the new prop is used
    }),
}));
```

This syntax is very confusing and could really use some explanation after the example.