Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public createElement (type: string) {
if (type === 'root') {
return new TaroRootElement()
}
if (controlledComponent.has(type)) {
return new FormElement(NodeType.ELEMENT_NODE, type)
}
return new TaroElement(NodeType.ELEMENT_NODE, type)
}