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

3.2.3 • 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

563

Version

3.2.3

License

MIT

Unpacked Size

54.9 kB

Total Files

31

Last publish

Collaborators

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