UNPKG

sucrase

Version:

Super-fast alternative to Babel for when you can target modern JS runtimes

18 lines (13 loc) 452 B
import Transformer from "./Transformer"; export default class FlowTransformer extends Transformer { constructor( rootTransformer, tokens) { super();this.rootTransformer = rootTransformer;this.tokens = tokens;; } process() { return ( this.rootTransformer.processPossibleArrowParamEnd() || this.rootTransformer.processPossibleAsyncArrowWithTypeParams() || this.rootTransformer.processPossibleTypeRange() ); } }