-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Change structs for generic types #3442
Conversation
Where are the templates for T and K defined?
|
Just to add, why would we need an alias for |
The template is delcrared here Map.js#28 and is it same on all structs files. Yes in programing the type |
Are you sure The purpose of |
Hum I don't find references for The Src: jsdoc/jsdoc#605 |
It doesn't matter that int/f aren't listed in jsdocs, neither is the I need to run some tests to see what the jsdoc output looks like when it hits a template definition, because when browsing the source code it is now completely meaningless, but as long as jsdoc understands the type is actually an object and not just the letter T then it will be fine. |
OK I can write an test tomorrow (I'm French) and for int/float we can make an alias for the ide recognize that types. |
Ok, as it stands currently jsdoc is having trouble parsing some of the new types. Here is a full dump of all the errors (this is from a branch created from this PR):
I checked one of the new
It doesn't appear to have a clue what the type is, so has just inserted it 'T' and 'K', which is a shame - I thought the point of a template was that it would map it back to an object again, like a TypeDef does. Not really sure what to do about this, as it stands it will literally print the types of the Map.set method as T and K in the output, which is a bit nuts :) |
This is logic out T and K type because is it generic type. But if you want we can rename Generic names Like I have try search if we can make predefined generic like my exemple ( The generic type is pretty usefull for make TypeDefs. I search an method for make generic types for Actions methods for increase autocomplete when use Typescript. |
Sorry for this commit : 63c9938 |
Could you use a custom tag? (something like I just released 3.3, so I can close off this PR if you like and you could rebase against 3.4? |
OK, seen that i rewrite all code we can close this PR. |
This PR changes (delete as applicable)
Describe the changes below:
I have change the structs type for make generics types like
Array
andObject
types.The types
integer
andfloat
is wrong or is correct ? If is correct we need create an alias fornumber
type.