Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sticky Scroll sticks to Class Decorator instead of Class in TypeScript #157584

Closed
jamesonknutson opened this issue Aug 8, 2022 · 4 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@jamesonknutson
Copy link

jamesonknutson commented Aug 8, 2022

Type: Bug

I use a simple class utility decorator when implementing abstract classes that I have imposed constraints on the static side of. Here's the exact code for it:

export function StaticDecorator <T> () {
  return <U extends T> (constructor: U) => {
    constructor // no operation, as this is just for typings
  }
}

This is how I use it:

abstract class Foo {
}

interface StaticFooable {
  doSomething (): string;
}

@StaticDecorator<StaticFooable>()
class Bar extends Foo {
  public static doSomething (): string {
    return 'Did it!'
  }
}

Anyways, replication code aside, the sticky scroll feature sticks to the decorator instead of the class.

VS Code version: Code 1.70.0 (da76f93, 2022-08-04T04:38:16.462Z)
OS version: Windows_NT x64 10.0.19044
Modes:

System Info
Item Value
CPUs AMD Ryzen 9 5950X 16-Core Processor (32 x 4000)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 127.91GB (109.72GB free)
Process Argv --crash-reporter-id 5cc20a14-bb06-4538-8a8d-b65608668d1b
Screen Reader no
VM 0%
Extensions (70)
Extension Author (truncated) Version
better-comments aar 3.0.2
jsdoc-markdown-highlighting bie 0.0.1
vscode-toggle-quotes Bri 0.3.6
multi-cursor-case-preserve Car 1.0.5
vscode-path-tools cg- 0.0.4
split-line che 1.0.2
hide-node-modules chr 1.0.1
vscode-opennewinstance chr 0.0.12
npm-intellisense chr 1.4.2
path-intellisense chr 2.8.1
bracket-select chu 2.0.2
node-modules-context-menu dar 0.0.3
vscode-eslint dba 2.2.6
template-generator-vscode Den 0.4.1
python-environment-manager don 1.0.4
python-extension-pack don 1.7.0
vscode-gitignore-syntax dun 0.1.2
json-tools eri 1.0.2
prettier-vscode esb 9.5.0
vscode-macros EXC 1.4.0
copilot Git 1.39.6432
remotehub Git 0.40.0
generate-switch-case-for-enum-type her 0.0.10
path-autocomplete ion 1.20.2
align-by-regex jan 1.0.4
search-node-modules jas 1.3.0
dupchecker jia 0.1.7
vscode-peacock joh 4.0.1
json-escaper jos 1.1.2
ts-debug kak 0.0.6
vsc-python-indent Kev 1.17.0
copy-unix-path kir 0.2.1
wrapSelection kon 0.10.0
contextualduplicate laf 0.2.0
vs-color-picker lih 1.0.0
add-to-gitignore mac 1.0.0
template-string-converter meg 0.6.0
python-path mge 0.0.11
import-sorter mik 3.3.1
ts-barrelr mik 1.6.0
dotenv mik 1.0.1
vscode-edits-history mis 0.1.6
python ms- 2022.12.0
vscode-pylance ms- 2022.8.10
notepadplusplus-keybindings ms- 1.0.7
remote-repositories ms- 0.18.0
vscode-typescript-next ms- 4.8.20220807
reload nat 0.0.6
hocus-pocus nic 1.7.0
indent-rainbow ode 8.3.1
fix-json oli 0.1.2
regexr-vscode Ora 1.1.1
vscode-twoslash-queries Ort 1.0.2
explorer-exclude Pet 1.3.1
tsimporter pmn 2.0.1
polacode pnp 0.3.4
quicktype qui 12.0.46
vscode-xml red 0.21.2022062916
vscode-yaml red 1.9.1
explorer-exclude-vscode-extension Red 1.2.2
vscode-sort-json ric 1.20.0
vscode-paste-and-indent Rub 0.0.8
move-ts str 1.12.0
vscode-counter uct 3.0.5
errorlens use 3.6.0
vscode-icons vsc 11.15.0
vscode-wakatime Wak 18.1.6
quokka-vscode Wal 1.0.497
better-align wwm 1.1.7
copy-hover-type You 0.0.6
@jamesonknutson
Copy link
Author

Here's a quick video showing the issue

Code_NIQsZUOfFX.mp4

@vianneychin
Copy link

Screen Shot 2022-08-08 at 6 21 58 PM

Love this feature! However the sticky scroll is also sticking to comments above functions as well.

@gjsjohnmurray
Copy link
Contributor

/duplicate and fixed in #157466

@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 9, 2022
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

5 participants