andywer / andywer/gear

Idea: leave type annotations as comments

Ouverte
#1 12 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
question
Langage dominant
JavaScript
Étoiles
33
Forks
2
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I tried out Gear on a little tinkering project over the weekend (https://github.com/bmakuh/quip-mass-exporter/blob/master/index.js#L16) and I found myself continuing to comment out the type annotations so I could just run my script directly in Node rather than having to compile it first. What would you think about the possibility of having Gear parse type annotations in comments? That way it would continue to remain standards-compliant JS while gaining the ability to be type-checkable.

You could do something like require the line to start with triple slashes `///` or something so that you wouldn't have to parse _every_ comment, and you could limit it to only comments directly above a function definition or assignment.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.