To be used with based cloud functions, adds types and utilities.
- Example based function
import { BasedFunction } from '@based/functions'
const submitVote: BasedFunction<
{ target: number },
'ok' | 'not-ok'
> = async (based, { target }) => {
if (target > 10) {
return 'ok'
}
return 'not-ok'
}
export default submitVote