chore: comments

This commit is contained in:
Evan You 2019-06-01 17:47:19 +08:00
parent ee5503b260
commit b77709286f
2 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,12 @@
// Indicates an element with dynamic textContent (children fast path)
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
// Indicates an element with dynamic style

View File

@ -192,7 +192,7 @@ function normalizeStyle(
}
}
function normalizeClass(value: unknown): string {
export function normalizeClass(value: unknown): string {
let res = ''
if (isString(value)) {
res = value