refactor(types): move shapeFlags to shared
This commit is contained in:
@@ -2,6 +2,7 @@ import { makeMap } from './makeMap'
|
||||
|
||||
export { makeMap }
|
||||
export * from './patchFlags'
|
||||
export * from './shapeFlags'
|
||||
export * from './globalsWhitelist'
|
||||
export * from './codeframe'
|
||||
export * from './mockWarn'
|
||||
|
||||
12
packages/shared/src/shapeFlags.ts
Normal file
12
packages/shared/src/shapeFlags.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export const enum ShapeFlags {
|
||||
ELEMENT = 1,
|
||||
FUNCTIONAL_COMPONENT = 1 << 1,
|
||||
STATEFUL_COMPONENT = 1 << 2,
|
||||
TEXT_CHILDREN = 1 << 3,
|
||||
ARRAY_CHILDREN = 1 << 4,
|
||||
SLOTS_CHILDREN = 1 << 5,
|
||||
SUSPENSE = 1 << 6,
|
||||
COMPONENT_SHOULD_KEEP_ALIVE = 1 << 7,
|
||||
COMPONENT_KEPT_ALIVE = 1 << 8,
|
||||
COMPONENT = ShapeFlags.STATEFUL_COMPONENT | ShapeFlags.FUNCTIONAL_COMPONENT
|
||||
}
|
||||
Reference in New Issue
Block a user