TypeScript Support
Mind Elixir is written in TypeScript and does not require the installation of additional npm packages. It inherently supports TypeScript.
import MindElixir, { MindElixirData, Options } from 'mind-elixir'
const options: Options = {
el: '#map',
}
const data: MindElixirData = {
nodeData: {
id: 'root',
topic: 'root',
children: [
{
id: 'sub1',
topic: 'sub1',
children: [
{
id: 'sub2',
topic: 'sub2',
},
],
},
],
},
}
const mei = new MindElixir(options)
mei.init(data)