Skip to content

Commit

Permalink
feat: expose *internal* APIs (#703)
Browse files Browse the repository at this point in the history
* feat: expose *internal* APIs

* fix: addresing naming concerns

* fix: types
  • Loading branch information
diervo authored Oct 3, 2018
1 parent 91bc49b commit b787190
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/lwc-engine/src/framework/def.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ function getPublicMethodsHash(target: ComponentConstructor): MethodDef {
}, create(null));
}

export function isComponentConstructor(Ctor: any): boolean {
return isElementComponent(Ctor);
}

export function getComponentDef(Ctor: ComponentConstructor): ComponentDef {
let def = CtorToDefMap.get(Ctor);
if (def) {
Expand Down
3 changes: 2 additions & 1 deletion packages/lwc-engine/src/framework/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// TODO: Revisit all of this exports figure out a better separation
export { createElement } from "./upgrade";
export { getComponentDef } from "./def";
export { getComponentDef, isComponentConstructor } from "./def";
export { LightningElement } from "./html-element";
export { register } from "./services";
export { unwrap } from "./membrane";
Expand Down

0 comments on commit b787190

Please sign in to comment.