Skip to content

Code outline: exportDefaultExpression outline could not show properly #1849

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

Closed
3 tasks done
IWANABETHATGUY opened this issue Apr 13, 2020 · 10 comments
Closed
3 tasks done

Comments

@IWANABETHATGUY
Copy link
Contributor

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: macOS
    but i am pretty sure you can reproduce this in other platform
  • Vetur version: 0.24.0
  • VS Code version: 1.44

Problem

this is not a bug for now , but may happen in next release

  • VSCode Version:1.44.0
  • Electron: 7.1.11
  • Chrome: 78.0.3904.130
  • Node.js: 12.8.1
  • V8: 7.8.279.23-electron.0
  • OS: Darwin x64 18.7.0

Steps to Reproduce:

  1. use vscode inter typescript version which is 3.8.3
  2. open a test.js file , and input code as below
export default {
  a: 'string',
  b: 2,
  c () {
    
  }
}
  1. a exportExpression outline is looks like
    image

when i change the typescript version to 3.7.5
the outline show below, i think this may be better, but i am not sure if this is a typescript bug or vscode's.
image
大纲 is outline

Does this issue occur when all extensions are disabled?: Yes

@IWANABETHATGUY
Copy link
Contributor Author

i make a issue to vscode, but there are thousands of issue in list, i am not sure they could notice me.

I contribute this repo yesterday, i clone the repo and install dependencies, the typescript version in directory server is ^3.7.5 but actually install 3.8.3, so when i vsce package it , i found that exportDefaultExpression outline gone, the same result as the first picture.

The exportDefaultExpression outline is import for .vue, because we can quickly jump to the component option like method, data with powerful symbol, but this change may destroy this experience. This may be a upstream bug of typescript , but i am not sure i can explain clearly about that, so i hope you could notice about this breaking change (not sure a bug or something else)

@IWANABETHATGUY
Copy link
Contributor Author

@ktsn sorry to bother you again.

@IWANABETHATGUY
Copy link
Contributor Author

upstream tracked here : microsoft/TypeScript#37877

@IWANABETHATGUY
Copy link
Contributor Author

fixed by microsoft/TypeScript#38255

@octref
Copy link
Member

octref commented Aug 25, 2020

Fixed when updating TS to 4.0.2:

image

@rathboma
Copy link

Do I need to manually install this version of typescript, or does the latest vscode install it?

If manual, how do I do that?

Sorry for dumb questions.

@rchl
Copy link
Collaborator

rchl commented Aug 30, 2020

  • Enable vetur.useWorkspaceDependencies and install the latest version of typescript in your project
    or
  • Wait for the next release of Vetur.

@rraihansaputra
Copy link

rraihansaputra commented Oct 11, 2020

This seems to not work for TypeScript enabled SFC with export default Vue.extend({options});. Is this a bug or am I doing something wrong with my SFC?

Vetur version: 0.28.0
Project TypeScript: 4.0.3
"vetur.useWorkspaceDependencies": true

without-vue-extend
with-vue-extend

@yoyo930021
Copy link
Member

yoyo930021 commented Oct 12, 2020

This seems to not work for TypeScript enabled SFC with export default Vue.extend({options});. Is this a bug or am I doing something wrong with my SFC?

Vetur version: 0.28.0
Project TypeScript: 4.0.3
"vetur.useWorkspaceDependencies": true

without-vue-extend
with-vue-extend

If you have some problem or bug, please open a new issue with template.

@rraihansaputra
Copy link

Thanks @yoyo930021, will open up a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants