@based/functions
v3.0.2
Published
To be used with based cloud functions, adds types and utilities.
Downloads
1,581
Keywords
Readme
@based/functions
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