Comments (5)
Hey 👋
Any chances to move newly added snippets for arrow function for TS to a new name?
Perhaps af
for TS -> aft
(arrow function typed) / taf
(typed arrow function)
Bringing this up cause i.e. af
changed and now requires to press tab 4 times to get to function body instead of previous 2 times. (Personally I'm a lot muscle-memorized it and 3.1.0 update now brings frustration. )
Thanks!
from vscode-hyper-javascript-snippets.
I was indecisive to this issue, very happy someone give me feedback.
What if:
af
: ($1)$2 => $0
(should/shouldn't add $2
for return type? click 2 times to get to function body)
afg
: $1($2)$3 => $0
(new, g stand for generic/generator maybe arrow generator function in future)
from vscode-hyper-javascript-snippets.
I'd go with an option
- leave
af
as it was: plain "js" function (seems to me pretty often use-case for some callbacks where TS infers return type) - add
afg
with$1($2)$3 => $0
for any other use case when user need to provide generics/return type
In general, my point : having backward compatibility would be awesome. I personally use af
like 50 times a day and very get used to it format.
Having new snippet for typed one is good, however, in my opinion, shouldn't kill existing behavior. 🙏
from vscode-hyper-javascript-snippets.
Finally, I provide four new snippets ar
, ara
(with return type), ag
, aga
(with generic and return type).
from vscode-hyper-javascript-snippets.
Thanks for the efforts @t7yang!
from vscode-hyper-javascript-snippets.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-hyper-javascript-snippets.