Skip to content

Fix findAllRefs, getHighlightSpans, renameLocs, renameInfo for default exports and functions expressions#3367

Merged
DanielRosenwasser merged 22 commits into
masterfrom
fixDeFaultOfFindAllRefsToMaster
Jun 29, 2015
Merged

Fix findAllRefs, getHighlightSpans, renameLocs, renameInfo for default exports and functions expressions#3367
DanielRosenwasser merged 22 commits into
masterfrom
fixDeFaultOfFindAllRefsToMaster

Conversation

@DanielRosenwasser

Copy link
Copy Markdown
Member

@DanielRosenwasser

Copy link
Copy Markdown
Member Author

@mhegazy I know we discussed in the other issue that we wanted to move the isImportOrExportSpecifierName check to getSymbolInfo but do you think we can merge this change in in the interest of keeping the PR small?

Conflicts:
	src/compiler/checker.ts
	src/compiler/types.ts
@DanielRosenwasser

Copy link
Copy Markdown
Member Author

Ping @yuit @mhegazy @vladima

@yuit

yuit commented Jun 26, 2015

Copy link
Copy Markdown
Contributor

Can you added rename cases for function expression and class expression?

// [|foo|] -> this should not get updated
function foo () {}

// [|foo|]  -> Should this get update?
var x = function [|foo|] () {}  // rename foo here should not affect foo outside

var y = function () {
   [|foo|](); // Rename foo here 
}
// [|Foo|] -> this should not get updated
class Foo () {}

// [|Foo|]  -> Should this get update
var x = class [|Foo|] () { \\ Rename Foo here
    getClassName() {
        [|Foo|] -> rename Foo here
    }
} 

var y = class {
   getSomeName() {
      [|Foo|].  -> rename Foo here
   }
}

Similar for findAllRefs

Comment thread src/services/services.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you mean by normalization? stripping quotes in getDeclaredName? if so could you mention this in the comment

DanielRosenwasser added a commit that referenced this pull request Jun 29, 2015
Fix findAllRefs, getHighlightSpans, renameLocs, renameInfo for default exports and functions expressions
@DanielRosenwasser DanielRosenwasser merged commit 591a0db into master Jun 29, 2015
@DanielRosenwasser DanielRosenwasser deleted the fixDeFaultOfFindAllRefsToMaster branch June 29, 2015 16:27
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants