Lona / compiler

Lona cross-platform code compiler
11 stars 3 forks source link

work on plugin type #9

Closed mathieudutour closed 4 years ago

mathieudutour commented 4 years ago

A plugin can now define what options it expects (no verification yet so still unknown as the arg) so that

import { convert } from '@lona/compiler'
import plugin from './plugins/js'

let x = await convert('here', plugin, { framework: 'react' })

is correctly typed (eg. framework is an enum, and x is void)