Opened 8 years ago

Closed 8 years ago

#12838 closed enhancement (fixed)

[patch] [cla] dojo/_base argument comments fix

Reported by: Stephen Chung Owned by: Eugene Lazutkin
Priority: lowest Milestone: 1.7
Component: Core Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:

Description

Fixes some types in argument comments.

Puts in comments where missing.

Attachments (2)

dojo._base.patch (2.3 KB) - added by Stephen Chung 8 years ago.
dojo._base.2.patch (1.7 KB) - added by Stephen Chung 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by Stephen Chung

Attachment: dojo._base.patch added

comment:1 Changed 8 years ago by bill

Milestone: 1.6.2tbd
Summary: dojo/_base argument comments fix[patch] [cla] dojo/_base argument comments fix

Note that if the data types should only be listed once, for example for dojo.byId() we already have:

/*=====
dojo.byId = function(id, doc){
	// id: String|DOMNode
	//	 	A string to match an HTML id attribute or a reference to a DOM Node
	// doc: Document?
	//		Document to work in. Defaults to the current value of
	//		dojo.doc.  Can be used to retrieve
	//		node references from other documents.
=====*/

So we don't need:

dojo.byId = function(/*String|DOMNode*/id, /*Document?*/doc){ 

Or is that for the benefit of closure compiler?

comment:2 Changed 8 years ago by Stephen Chung

Bill, you're correct. Sorry I forgot to remove those few patches that have corresponding comment blocks. :-)

Note: only the closure compiler needs JsDoc? comments. However, it can also be generated from the comment block in a post-processing pass in addition to in-line argument type comments.

comment:3 in reply to:  2 Changed 8 years ago by Eugene Lazutkin

Milestone: tbd1.7
Owner: set to Eugene Lazutkin
Status: newassigned

Replying to schungx:

Bill, you're correct. Sorry I forgot to remove those few patches that have corresponding comment blocks. :-)

Are you going to update your patch? Or is it good already?

Changed 8 years ago by Stephen Chung

Attachment: dojo._base.2.patch added

comment:4 Changed 8 years ago by Stephen Chung

Patch updated. Unfortunately I neglected to click the "replace" checkbox, so now the new patch is in "dojo._base.2.patch"

"dojo.place" and "dojo.create" have argument types in the comment block below the function declaration but not in-line with the arguments. Not sure whether the comment block counts as duplicated type comments, so I just left the two lines in the patch. It appears to be more the standard style these days with in-line type comments and no type in the block comment below the function declaration.

comment:5 Changed 8 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

Fixed in [24740].

Note: See TracTickets for help on using tickets.