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

Support TypeScript Server's per-file setting for rename configuration #68029

Closed
mjbvz opened this issue Feb 7, 2019 · 4 comments
Closed

Support TypeScript Server's per-file setting for rename configuration #68029

mjbvz opened this issue Feb 7, 2019 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 7, 2019

Support the rename operation flags added with microsoft/TypeScript#29593

This fixes microsoft/TypeScript#29238 for VS Code but will require TS 3.4+, which we won't bundle until March

@mjbvz mjbvz added feature-request Request for new features or functionality typescript Typescript support issues javascript JavaScript support issues labels Feb 7, 2019
@mjbvz mjbvz added this to the February 2019 milestone Feb 7, 2019
@mjbvz mjbvz self-assigned this Feb 7, 2019
@mjbvz mjbvz added the verification-needed Verification of issue is requested label Feb 14, 2019
@mjbvz
Copy link
Collaborator Author

mjbvz commented Feb 14, 2019

For verification:

  1. Install and enable typescript@next in your workspace
  2. Use the example code from Option to disable aliased JS/TS destructured property renaming TypeScript#29238
  3. Verify the renames introduce aliases for shorthand by default.
  4. Now set "typescript.preferences.renameShorthandProperties": false and verify that renames don't introduce alias

@mjbvz mjbvz closed this as completed in b452299 Feb 14, 2019
@alexr00
Copy link
Member

alexr00 commented Feb 26, 2019

I'm still seeing the aliasing even with the setting:

// before rename
const x = {
    y: 'value'
}
const { y } = x;
console.log(y);

// after rename
const x = {
	z: 'value'
};
const { z: y } = x;
console.log(y);

From package.json: "typescript": "^3.4.0-dev.20190226",. I made sure to yarn.

@alexr00 alexr00 added the verification-found Issue verification failed label Feb 26, 2019
@alexr00 alexr00 reopened this Feb 26, 2019
@mjbvz
Copy link
Collaborator Author

mjbvz commented Feb 26, 2019

@alexr00 I can't repo it not working. Did you enable TS 3.4 in your workspace by running: select typescript version? Also, if in a js file make sure to set "javascript.preferences.renameShorthandProperties": false in addition to of "typescript.preferences.renameShorthandProperties": false`

@mjbvz mjbvz closed this as completed Feb 27, 2019
@mjbvz mjbvz removed the verification-found Issue verification failed label Feb 27, 2019
@alexr00
Copy link
Member

alexr00 commented Mar 1, 2019

I had not done the select typescript version.

@alexr00 alexr00 added the verified Verification succeeded label Mar 1, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants