Skip to content

Commit cf6ad88

Browse files
committed
chore(docs/source/api): add some jsdoc-typescript types to help remember all values
This makes use of https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html and is still fully compatible with plain js
1 parent fcb2bfc commit cf6ad88

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/source/api.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,21 @@ for (const file of files) {
6363

6464
parse();
6565

66+
/**
67+
* @typedef {Object} PropContext
68+
* @property {boolean} [isStatic] Defines wheter the current property is a static property (not mutually exlusive with "isInstance")
69+
* @property {boolean} [isInstance] Defines wheter the current property is a instance property (not mutually exlusive with "isStatic")
70+
* @property {boolean} [isFunction] Defines wheter the current property is meant to be a function
71+
* @property {string} [constructor] Defines the Constructor (or rather path) the current property is on
72+
* @property {boolean} [constructorWasUndefined] Defined wheter the "constructor" property was defined by "dox", but was set to "undefined"
73+
* @property {string} [type] Defines the type the property is meant to be
74+
* @property {string} [name] Defines the current Properties name
75+
* @property {Object} [return] The full object for a "@return" jsdoc tag
76+
* @property {string} [string] Defines the full string the property will be listed as
77+
* @property {string} [anchorId] Defines the Anchor ID to be used for linking
78+
* @property {string} [description] Defines the Description the property will be listed with
79+
*/
80+
6681
function parse() {
6782
for (const props of combinedFiles) {
6883
let name = props.file.
@@ -94,7 +109,8 @@ function parse() {
94109
if (prop.ignore || prop.isPrivate) {
95110
continue;
96111
}
97-
112+
113+
/** @type {PropContext} */
98114
const ctx = prop.ctx || {};
99115

100116
// somehow in "dox", it is named "receiver" sometimes, not "constructor"

0 commit comments

Comments
 (0)