diff --git a/src/index.ts b/src/index.ts index f5d9641..1c4097f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,16 +1,12 @@ import phantom from "./phantom"; import createPhantomStore from "./createPhantomStore"; // types -export { - PhantomElement, - PhantomDOMFunction, - PhantomDOM, -} from "./types/phantomDOM"; // phantomDOM +export { PhantomElement, PhantomComponent, PhantomDOM } from "./types/phantom"; export { PhantomAction, PhantomReducer, Subscription, -} from "./types/phantomStore"; // phantomStore +} from "./types/phantomStore"; export { createPhantomStore }; export default phantom; diff --git a/src/phantom.ts b/src/phantom.ts index 4e77e8c..6476c38 100644 --- a/src/phantom.ts +++ b/src/phantom.ts @@ -1,14 +1,17 @@ import { PhantomStore } from "./types/phantomStore"; -import { Phantom } from "./types/phantom"; - import { - PhantomDOMFunction, + Phantom, + PhantomComponent, PhantomDOM, PhantomElement, -} from "./types/phantomDOM"; +} from "./types/phantom"; + import phantomExorciser from "./phantomExorciser"; -function PHANTOM(phantomStore: PhantomStore, PhantomDOM: PhantomDOMFunction) { +function PHANTOM( + phantomStore: PhantomStore, + phantomComponent: PhantomComponent +) { let phantomDOM: PhantomDOM = { test: { tagName: "div", @@ -40,7 +43,7 @@ function PHANTOM(phantomStore: PhantomStore, PhantomDOM: PhantomDOMFunction) { function coalescePhantomDOM() { return `