File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -62,28 +62,18 @@ const meta = convertElement('meta')
6262/**
6363 * Check if the given value is *phrasing* content.
6464 *
65- * @param {unknown } value
66- * Thing to check, typically `Node` .
65+ * @param {Nodes } value
66+ * Node to check.
6767 * @returns {boolean }
6868 * Whether `value` is phrasing content.
6969 */
7070export function phrasing ( value ) {
7171 return Boolean (
72- node ( value ) &&
73- ( value . type === 'text' ||
74- basic ( value ) ||
75- embedded ( value ) ||
76- // @ts -expect-error: To do: update `hast-util-is-body-ok-link` in `rehype-minify`.
77- isBodyOkLink ( value ) ||
78- ( meta ( value ) && hasProperty ( value , 'itemProp' ) ) )
72+ value . type === 'text' ||
73+ basic ( value ) ||
74+ embedded ( value ) ||
75+ // @ts -expect-error: To do: update `hast-util-is-body-ok-link` in `rehype-minify`.
76+ isBodyOkLink ( value ) ||
77+ ( meta ( value ) && hasProperty ( value , 'itemProp' ) )
7978 )
8079}
81-
82- /**
83- * @param {unknown } value
84- * @returns {value is Nodes }
85- */
86- function node ( value ) {
87- // @ts -expect-error: looks like an object.
88- return value && typeof value === 'object' && 'type' in value
89- }
Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ Check if the given value is [*phrasing*][spec] content.
105105
106106###### Parameters
107107
108- * ` value ` (` unknown ` )
109- — thing to check, typically [ ` Node ` ] [ node ]
108+ * ` value ` ([ ` Node ` ] [ node ] )
109+ — node to check
110110
111111###### Returns
112112
You can’t perform that action at this time.
0 commit comments