-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypedefs.jsdoc
56 lines (51 loc) · 1.73 KB
/
typedefs.jsdoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* @namespace Types
*/
/**
* Represents a position on a board.
*
* This is a two-element array of positive integers, where the first integer is
* the column offset of the position (horizontal axis) and the second integer is
* the row offset of the position (vertical axis). Higher values for the column
* offset are closer to the right side of the board. Higher values for the row
* offset are closer to the bottom side of the board.
*
* @typedef {number[]} BoardPosition
* @memberof Types
*/
/**
* Represents a position on a board. Same as {@link Types.BoardPosition}, but represented
* as a two-element {@link external:Immutable.Collection.Indexed|Immutable indexed collection},
* such as a {@link external:Immutable.List}.
*
* @typedef {external:Immutable.Collection.Indexed<number>} BoardPositionImmutable
* @memberof Types
*/
/**
* Represents a cell on the board.
*
* @typedef {object} Cell
* @memberof Types
* @prop {Types.BoardPosition} position - the position of the cell on the board
* @prop {string|undefined} color - the color of the marble currently occupying the
* cell (if any)
*/
/**
* Represents a quintro or potential quintro.
*
* @typedef {object} Quintro
* @memberof Types
* @prop {string} color - the color of any filled cells in the quintro (a quintro
* can only contain a combination of one or more cells of any single color plus zero
* or more empty cells)
* @prop {Types.Cell[]} quintro - the cells that comprise this quintro
*/
/**
* Any item that React is able to render; number, string, React component, DOM node, etc.
*
* @typedef {*} RenderableElement
* @memberof Types
*
* @see {@link https://reactjs.org/docs/typechecking-with-proptypes.html} - corresponds to the
* `element` PropType
*/