@based/functions
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @based/functions

Weekly Downloads

497

Version

3.0.2

License

MIT

Unpacked Size

94.4 kB

Total Files

42

Last publish

Collaborators

  • luiguild
  • nfrade
  • kylemarch513
  • framma
  • olliv
  • youzid
  • rase-
  • saulx