[REF] reorganize file structure

in order to separate compiler/ and runtime/ code
This commit is contained in:
Géry Debongnie
2022-05-26 23:45:40 +02:00
committed by Sam Degueldre
parent e4b810c027
commit 22a79cdedd
68 changed files with 100 additions and 91 deletions
+24
View File
@@ -0,0 +1,24 @@
import type { Component } from "./component";
// -----------------------------------------------------------------------------
// Status
// -----------------------------------------------------------------------------
export const enum STATUS {
NEW,
MOUNTED, // is ready, and in DOM. It has a valid el
DESTROYED,
}
type STATUS_DESCR = "new" | "mounted" | "destroyed";
export function status(component: Component): STATUS_DESCR {
switch (component.__owl__.status) {
case STATUS.NEW:
return "new";
case STATUS.MOUNTED:
return "mounted";
case STATUS.DESTROYED:
return "destroyed";
}
}