chore: masks
This commit is contained in:
parent
ee50fb9723
commit
1cc7734c24
@ -2,21 +2,23 @@
|
|||||||
export const enum VNodeFlags {
|
export const enum VNodeFlags {
|
||||||
ELEMENT_HTML = 1,
|
ELEMENT_HTML = 1,
|
||||||
ELEMENT_SVG = 1 << 1,
|
ELEMENT_SVG = 1 << 1,
|
||||||
ELEMENT = ELEMENT_HTML | ELEMENT_SVG,
|
|
||||||
|
|
||||||
COMPONENT_UNKNOWN = 1 << 2,
|
COMPONENT_UNKNOWN = 1 << 2,
|
||||||
COMPONENT_STATEFUL_NORMAL = 1 << 3,
|
COMPONENT_STATEFUL_NORMAL = 1 << 3,
|
||||||
COMPONENT_STATEFUL_SHOULD_KEEP_ALIVE = 1 << 4,
|
COMPONENT_STATEFUL_SHOULD_KEEP_ALIVE = 1 << 4,
|
||||||
COMPONENT_STATEFUL_KEPT_ALIVE = 1 << 5,
|
COMPONENT_STATEFUL_KEPT_ALIVE = 1 << 5,
|
||||||
COMPONENT_STATEFUL = COMPONENT_STATEFUL_NORMAL |
|
|
||||||
COMPONENT_STATEFUL_SHOULD_KEEP_ALIVE |
|
|
||||||
COMPONENT_STATEFUL_KEPT_ALIVE,
|
|
||||||
COMPONENT_FUNCTIONAL = 1 << 6,
|
COMPONENT_FUNCTIONAL = 1 << 6,
|
||||||
COMPONENT = COMPONENT_UNKNOWN | COMPONENT_STATEFUL | COMPONENT_FUNCTIONAL,
|
|
||||||
|
|
||||||
TEXT = 1 << 7,
|
TEXT = 1 << 7,
|
||||||
FRAGMENT = 1 << 8,
|
FRAGMENT = 1 << 8,
|
||||||
PORTAL = 1 << 9
|
PORTAL = 1 << 9,
|
||||||
|
|
||||||
|
// masks (only use for bitwise checks, do not use equal checks or assign)
|
||||||
|
ELEMENT = ELEMENT_HTML | ELEMENT_SVG,
|
||||||
|
COMPONENT_STATEFUL = COMPONENT_STATEFUL_NORMAL |
|
||||||
|
COMPONENT_STATEFUL_SHOULD_KEEP_ALIVE |
|
||||||
|
COMPONENT_STATEFUL_KEPT_ALIVE,
|
||||||
|
COMPONENT = COMPONENT_UNKNOWN | COMPONENT_STATEFUL | COMPONENT_FUNCTIONAL
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum ChildrenFlags {
|
export const enum ChildrenFlags {
|
||||||
@ -27,6 +29,8 @@ export const enum ChildrenFlags {
|
|||||||
NONE_KEYED_VNODES = 1 << 3,
|
NONE_KEYED_VNODES = 1 << 3,
|
||||||
STABLE_SLOTS = 1 << 4,
|
STABLE_SLOTS = 1 << 4,
|
||||||
DYNAMIC_SLOTS = 1 << 5,
|
DYNAMIC_SLOTS = 1 << 5,
|
||||||
|
|
||||||
|
// masks
|
||||||
HAS_SLOTS = STABLE_SLOTS | DYNAMIC_SLOTS,
|
HAS_SLOTS = STABLE_SLOTS | DYNAMIC_SLOTS,
|
||||||
MULTIPLE_VNODES = KEYED_VNODES | NONE_KEYED_VNODES
|
MULTIPLE_VNODES = KEYED_VNODES | NONE_KEYED_VNODES
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user