stijn.aerts
stijn.aerts

Reputation: 6206

When writing TypeScript in Sublime the autocompletion doesn't add brackets

When I write TypeScript in SublimeText and I let Sublime autocomplete a method, Sublime doesn't add the brackets.

For example when I write:

this.

And I let the autocomplete do his work, I get:

this.getHeroes

Instead of:

this.getHeroes()

I have been searching for a solution but this seems like default behavior that can't be adjusted. Has anyone found a solution for this?

Upvotes: 0

Views: 215

Answers (1)

basarat
basarat

Reputation: 276363

Has anyone found a solution for this

Does not exist. You will have to write your own.

Note that its not trivial because autocomplete generally only inserts text. If you want to get this.getHeroes() you would probably need to move the cursor too this.getHeroes(/*here*/). Also think you want to give this function to someone e.g setTimeout(this.getHeroes) you probably didn't mean to call the function but just want a function reference.

Upvotes: 2

Related Questions