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

Convert to ES2015 class do not recognize inheritance #32491

Open
Mingun opened this issue Jul 14, 2019 · 0 comments
Open

Convert to ES2015 class do not recognize inheritance #32491

Mingun opened this issue Jul 14, 2019 · 0 comments
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript

Comments

@Mingun
Copy link

Mingun commented Jul 14, 2019

Issue Type: Bug

function Derived() {
  Base.call(this, /*some base args*/);
  /* some other constructor work */
};
Derived.prototype = new Base();
Derived.prototype.constructor = Derived;

must be converted to

class Derived extends Base {
  constructor() {
    super(/*some base args*/);
    /* some other constructor work */
  }
}

Right now it converted to

class Derived {
  constructor() {
    Base.call(this, /*some base args*/);
    /* some other constructor work */
  }
}
;
Derived.prototype = new Base();
Derived.prototype.constructor = Derived;

VS Code version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:59:35.033Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 1992)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.89GB (2.36GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (14)
Extension Author (truncated) Version
search-crates-io bel 1.2.1
better-toml bun 0.3.2
bracket-pair-colorizer-2 Coe 0.0.28
pegjs-syntax fut 0.1.1
nwscript glo 0.0.2
restructuredtext lex 112.0.0
hg mrc 1.3.0
vscode-language-pack-ru MS- 1.36.2
rust rus 0.6.1
crates ser 0.4.3
vscode-hexdump sle 1.7.2
code-spell-checker str 1.7.17
code-spell-checker-russian str 0.2.2
sort-lines Tyr 1.8.0
@mjbvz mjbvz self-assigned this Jul 14, 2019
@mjbvz mjbvz transferred this issue from microsoft/vscode Jul 20, 2019
@mjbvz mjbvz removed their assignment Jul 20, 2019
@RyanCavanaugh RyanCavanaugh added Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript labels Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants