Skip to content

Commit

Permalink
Fix tag type JSDOC when use multiple types | Fixes #736
Browse files Browse the repository at this point in the history
  • Loading branch information
matuzalemsteles committed Mar 14, 2018
1 parent 1e4caad commit da68dc1
Show file tree
Hide file tree
Showing 35 changed files with 276 additions and 241 deletions.
7 changes: 4 additions & 3 deletions packages/clay-alert/src/ClayAlert.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import templates from './ClayAlert.soy.js';

/**
* Metal Clay Alert component.
* @extends Component
*/
class ClayAlert extends Component {
/**
Expand Down Expand Up @@ -64,7 +65,7 @@ ClayAlert.STATE = {
* CSS classes to be applied to the element.
* @instance
* @memberof ClayAlert
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
elementClasses: Config.string(),
Expand All @@ -73,7 +74,7 @@ ClayAlert.STATE = {
* Id to be applied to the element.
* @instance
* @memberof ClayAlert
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
id: Config.string(),
Expand All @@ -82,7 +83,7 @@ ClayAlert.STATE = {
* The message of alert
* @instance
* @memberof ClayAlert
* @type {!html|string}
* @type {!(html|string)}
*/
message: Config.any().required(),

Expand Down
7 changes: 4 additions & 3 deletions packages/clay-alert/src/ClayAlertBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import templates from './ClayAlertBase.soy.js';

/**
* Metal Clay Alert Base component.
* @extends Component
*/
class ClayAlertBase extends Component {
/**
Expand Down Expand Up @@ -177,7 +178,7 @@ ClayAlertBase.STATE = {
* CSS classes to be applied to the element.
* @instance
* @memberof ClayAlert
* @type {?string|undefined}
* @type {(?string|undefined)}
* @default undefined
*/
elementClasses: Config.string(),
Expand All @@ -186,7 +187,7 @@ ClayAlertBase.STATE = {
* Id to be applied to the element.
* @instance
* @memberof ClayAlert
* @type {?string|undefined}
* @type {(?string|undefined)}
* @default undefined
*/
id: Config.string(),
Expand All @@ -195,7 +196,7 @@ ClayAlertBase.STATE = {
* The message of alert
* @instance
* @memberof ClayAlertBase
* @type {!html|string}
* @type {!(html|string)}
*/
message: Config.any().required(),

Expand Down
5 changes: 3 additions & 2 deletions packages/clay-alert/src/ClayStripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import templates from './ClayStripe.soy.js';

/**
* Metal Clay Stripe component.
* @extends Component
*/
class ClayStripe extends Component {
/**
Expand Down Expand Up @@ -64,7 +65,7 @@ ClayStripe.STATE = {
* CSS classes to be applied to the element.
* @instance
* @memberof ClayStripe
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
elementClasses: Config.string(),
Expand All @@ -73,7 +74,7 @@ ClayStripe.STATE = {
* Id to be applied to the element.
* @instance
* @memberof ClayStripe
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
id: Config.string(),
Expand Down
7 changes: 4 additions & 3 deletions packages/clay-alert/src/ClayToast.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import templates from './ClayToast.soy.js';

/**
* Metal Clay Toast component.
* @extends Component
*/
class ClayToast extends Component {
/**
Expand Down Expand Up @@ -64,7 +65,7 @@ ClayToast.STATE = {
* CSS classes to be applied to the element.
* @instance
* @memberof ClayToast
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
elementClasses: Config.string(),
Expand All @@ -73,7 +74,7 @@ ClayToast.STATE = {
* Id to be applied to the element.
* @instance
* @memberof ClayToast
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
id: Config.string(),
Expand All @@ -82,7 +83,7 @@ ClayToast.STATE = {
* The message of alert
* @instance
* @memberof ClayToast
* @type {!html|string}
* @type {!(html|string)}
*/
message: Config.any().required(),

Expand Down
9 changes: 5 additions & 4 deletions packages/clay-badge/src/ClayBadge.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import templates from './ClayBadge.soy.js';

/**
* Metal Clay Badge component.
* @extends Component
*/
class ClayBadge extends Component {}

Expand All @@ -20,7 +21,7 @@ ClayBadge.STATE = {
* CSS classes to be applied to the element.
* @instance
* @memberof ClayBadge
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
elementClasses: Config.string(),
Expand All @@ -29,8 +30,8 @@ ClayBadge.STATE = {
* Id to be applied to the element.
* @instance
* @memberof ClayBadge
* @type {?string|undefined}
* default undefined
* @type {?(string|undefined)}
* @default undefined
*/
id: Config.string(),

Expand All @@ -39,7 +40,7 @@ ClayBadge.STATE = {
* @instance
* @memberof ClayBadge
* @type {!string}
* default undefined
* @default undefined
*/
label: Config.string().required(),

Expand Down
21 changes: 11 additions & 10 deletions packages/clay-button/src/ClayButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import templates from './ClayButton.soy.js';

/**
* Metal Clay Button component.
* @extends ClayComponent
*/
class ClayButton extends ClayComponent {}

Expand All @@ -21,7 +22,7 @@ ClayButton.STATE = {
* Aria label attribute for the button element.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
ariaLabel: Config.string(),
Expand Down Expand Up @@ -57,7 +58,7 @@ ClayButton.STATE = {
* CSS classes to be applied to the element.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
elementClasses: Config.string(),
Expand All @@ -66,7 +67,7 @@ ClayButton.STATE = {
* Icon to be rendered in the button.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
icon: Config.string(),
Expand All @@ -84,7 +85,7 @@ ClayButton.STATE = {
* Id to be applied to the element.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
id: Config.string(),
Expand All @@ -93,7 +94,7 @@ ClayButton.STATE = {
* The label of the button content.
* @instance
* @memberof ClayButton
* @type {?html|string|undefined}
* @type {?(html|string|undefined)}
* @default undefined
*/
label: Config.any(),
Expand All @@ -111,7 +112,7 @@ ClayButton.STATE = {
* The name attribute value of the element.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
name: Config.string(),
Expand All @@ -121,7 +122,7 @@ ClayButton.STATE = {
* button size.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
size: Config.oneOf(['sm']),
Expand All @@ -130,7 +131,7 @@ ClayButton.STATE = {
* The path to the SVG spritemap file containing the icons.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
spritemap: Config.string(),
Expand All @@ -140,7 +141,7 @@ ClayButton.STATE = {
* purposes.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default primary
*/
style: Config.oneOf(['link', 'primary', 'secondary', 'unstyled']).value(
Expand All @@ -160,7 +161,7 @@ ClayButton.STATE = {
* The value attribute value of the element.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
value: Config.string(),
Expand Down
11 changes: 6 additions & 5 deletions packages/clay-card-grid/src/ClayCardGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import templates from './ClayCardGrid.soy.js';

/**
* Metal ClayCardGrid component.
* @extends Component
*/
class ClayCardGrid extends Component {
/**
Expand All @@ -38,7 +39,7 @@ ClayCardGrid.STATE = {
* CSS classes to be applied to the element.
* @instance
* @memberof ClayCardGrid
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
elementClasses: Config.string(),
Expand All @@ -47,7 +48,7 @@ ClayCardGrid.STATE = {
* Id to be applied to the element.
* @instance
* @memberof ClayCardGrid
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
id: Config.string(),
Expand All @@ -56,7 +57,7 @@ ClayCardGrid.STATE = {
* List of items.
* @instance
* @memberof ClayCardGrid
* @type {?array|undefined}
* @type {?(array|undefined)}
* @default undefined
*/
items: Config.array(),
Expand Down Expand Up @@ -96,7 +97,7 @@ ClayCardGrid.STATE = {
* The path to the SVG spritemap file containing the icons.
* @instance
* @memberof ClayCardGrid
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
spritemap: Config.string(),
Expand All @@ -105,7 +106,7 @@ ClayCardGrid.STATE = {
* Header of the list group.
* @instance
* @memberof ClayCardGrid
* @type {?string|undefined}
* @type {?(string|undefined)}
* @default undefined
*/
title: Config.string(),
Expand Down
Loading

0 comments on commit da68dc1

Please sign in to comment.