Skip to content

Commit bec313e

Browse files
committed
Cleanup some JSDoc comments
1 parent 5132a27 commit bec313e

File tree

11 files changed

+7
-20
lines changed

11 files changed

+7
-20
lines changed

jsx-runtime.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import { createElement } from "./src/core.js";
33
export { Fragment } from "./src/core.js";
44

55
/**
6-
*
76
* @param {any} type
87
* @param {any} props
9-
* @param {any} [key ]
8+
* @param {any} [key]
109
* @returns
1110
*/
1211
export const jsx = (type, props, key) => {

src/context.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export const useConsumer = (id) => {
6565
};
6666

6767
/**
68-
*
6968
* @type {import("context").UseContext}
7069
*/
7170
export const useContext = (context) => {

src/element/custom-element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { setPrototype, transformValue } from "./set-prototype.js";
66
export { Any, createType } from "./set-prototype.js";
77

88
let ID = 0;
9+
910
/**
10-
*
1111
* @param {Element & {dataset?:object}} node
1212
* @returns {string|number}
1313
*/

src/element/errors.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export class Error {
22
/**
3-
*
43
* @param {HTMLElement} target
54
* @param {string} message
65
* @param {string} value

src/element/set-prototype.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ export const transformValue = (type, value) =>
160160
new type(value);
161161

162162
/**
163-
*
164163
* @param {import("schema").TypeCustom<(...args:any)=>any>} TypeCustom
165164
* @param {*} value
166165
* @returns
@@ -172,6 +171,7 @@ export const mapValue = ({ map }, value) => {
172171
return { value, error: true };
173172
}
174173
};
174+
175175
/**
176176
* Filter the values based on their type
177177
* @param {any} type
@@ -211,6 +211,7 @@ export const createType = (map, serialize) => ({
211211
map,
212212
serialize,
213213
});
214+
214215
/**
215216
* Type any, used to avoid type validation.
216217
* @typedef {null} Any

src/hooks/custom-hooks/use-prop.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { useHost } from "../create-hooks.js";
22

33
/**
4-
*
54
* @type {import("core").UseProp}
65
*/
76
export const useProp = (name) => {

src/hooks/custom-hooks/use-suspense.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,17 @@ export const useAsync = (callback, args) => {
4747
};
4848

4949
/**
50-
*
5150
* @type {import("core").UseSuspense}
5251
*/
53-
5452
export const useSuspense = (fps = 8) => {
5553
const host = useHost();
54+
5655
/**
5756
* @type {import("internal/hooks").ReturnSetStateUseSuspense}
5857
*/
5958
const [status, setStatus] = useState({ pending: true });
6059

6160
/**
62-
*
6361
* @param {()=>any} callback
6462
* @param {number} deep
6563
*/
@@ -94,6 +92,7 @@ export const useSuspense = (fps = 8) => {
9492
}, fps);
9593
}
9694
};
95+
9796
/**
9897
* @param {Event} event
9998
*/

src/render.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ function diff(newVnode, node, id = ID, hydrate = false, isSvg = false) {
226226
return node;
227227
}
228228
/**
229-
*
230229
* @param {Element|ShadowRoot} parent
231230
* @param {boolean} [hydrate]
232231
* @return {import("vnode").Fragment}
@@ -379,7 +378,6 @@ export function renderChildren(children, fragment, parent, id, hydrate, isSvg) {
379378
}
380379

381380
/**
382-
*
383381
* @param {Element} node
384382
* @param {Object} props
385383
* @param {Object} nextProps
@@ -397,7 +395,6 @@ export function diffProps(node, props, nextProps, handlers, isSvg) {
397395
}
398396

399397
/**
400-
*
401398
* @param {Element} node
402399
* @param {string} key
403400
* @param {any} prevValue
@@ -484,7 +481,6 @@ export function setProperty(node, key, prevValue, nextValue, isSvg, handlers) {
484481
}
485482

486483
/**
487-
*
488484
* @param {Node} node
489485
* @param {string} type
490486
* @param {import("vnode").VNodeListener} [nextHandler]
@@ -519,7 +515,6 @@ export function setEvent(node, type, nextHandler, handlers) {
519515
}
520516

521517
/**
522-
*
523518
* @param {*} style
524519
* @param {string} key
525520
* @param {string} value

src/utils.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export const isObject = (value) => typeof value == "object";
3333
export const { isArray } = Array;
3434

3535
/**
36-
*
3736
* @param {Element & {dataset?:object}} node
3837
* @returns
3938
*/
@@ -83,7 +82,6 @@ export function flat(list, callback) {
8382
}
8483

8584
/**
86-
*
8785
* @param {Element} target
8886
* @param {string} type
8987
* @param {(event:Event)=>void} handler

ssr/load.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ let ID = 0;
1212
if (isServer()) setOptions(options);
1313

1414
/**
15-
*
1615
* @param {import("../src/options").Options} options
1716
*/
1817
function setOptions(options) {

0 commit comments

Comments
 (0)