-
Notifications
You must be signed in to change notification settings - Fork 46
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
Adds support for types declared in comments #1293
Conversation
Perhaps we should have a
|
We should also support |
the You'll have to use it directly above an assignment:
|
The problem is that assignment can get quite messy sometimes. Consider this code:
Which assignment ? Unfortunately it would probably need to be above the assignment in both the I modeled this @type after the Would using |
Hey there! I just built a new temporary npm package based on 0fda0c1. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.36-types-in-comments.20240906114905.tgz |
regarding
This is a little awkward, because we have no way of saying a variable is of a certain type and it is that type for the whole function. if |
Hey there! I just built a new temporary npm package based on 3d66f6a. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.36-types-in-comments.20240906124427.tgz |
Hey there! I just built a new temporary npm package based on b2bbc79. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.36-types-in-comments.20240906135454.tgz |
With the latest commit, this supports union types in |
Hey there! I just built a new temporary npm package based on fcc2585. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.36-types-in-comments.20240906191536.tgz |
Hey there! I just built a new temporary npm package based on a975794. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.36-types-in-comments.20240906191858.tgz |
Hey there! I just built a new temporary npm package based on 0223109. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.36-types-in-comments.20240909115724.tgz |
Adds ability to define variable types in comments:
@param {type}
for function params@return {type}
for function return type@type {type}
and@type {type} varName
for variables in functions