chore: comments
This commit is contained in:
parent
ee5503b260
commit
b77709286f
@ -16,7 +16,12 @@
|
|||||||
// Indicates an element with dynamic textContent (children fast path)
|
// Indicates an element with dynamic textContent (children fast path)
|
||||||
export const TEXT = 1
|
export const TEXT = 1
|
||||||
|
|
||||||
// Indicates an element with dynamic class
|
// Indicates an element with dynamic class.
|
||||||
|
// The compiler also pre-normalizes the :class binding:
|
||||||
|
// - b -> normalize(b)
|
||||||
|
// - ['foo', b] -> 'foo' + normalize(b)
|
||||||
|
// - { a, b: c } -> (a ? a : '') + (b ? c : '')
|
||||||
|
// - ['a', b, { c }] -> 'a' + normalize(b) + (c ? c : '')
|
||||||
export const CLASS = 1 << 1
|
export const CLASS = 1 << 1
|
||||||
|
|
||||||
// Indicates an element with dynamic style
|
// Indicates an element with dynamic style
|
||||||
|
@ -192,7 +192,7 @@ function normalizeStyle(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function normalizeClass(value: unknown): string {
|
export function normalizeClass(value: unknown): string {
|
||||||
let res = ''
|
let res = ''
|
||||||
if (isString(value)) {
|
if (isString(value)) {
|
||||||
res = value
|
res = value
|
||||||
|
Loading…
Reference in New Issue
Block a user