import type { SerializedVis } from './vis' ; import type { VisParams } from '../common' ; export const createVisAsync = async < TVisParams = VisParams > ( visType , visState = { } as any ) => { await import ( './vis.scss' ) ; const { Vis } = await import ( './vis' ) ; const vis = new Vis ( visType , visState ) ; await vis . setState ( visState ) ; return vis ; } ;