type-dynamo icon indicating copy to clipboard operation
type-dynamo copied to clipboard

Not pushed to npm?

Open mikecann opened this issue 6 years ago • 1 comments

Sorry to raise another issue!

Im not sure whats wrong either the docs or the code or something hasnt been pushed to npm or whatever but a lot of the examples dont work.

For example:

// dynamo.config.ts
import { TypeDynamo } from 'type-dynamo'
export const typeDynamo = new TypeDynamo({
  accessKeyId: process.env.accessKeyId,
  secretAccessKey: process.env.secretAccessKey,
})

Doesnt compile as it needs the region param.

import { UserRepo } from './User'

async function getUserById(id: string) { 
  const result = await UserRepo.find({id}).execute() // pass the id as an object { "id": id }
  const user = result.data
  console.log(user.id, user.name, user.email, user.age) // you're type-safe
}

find() doesnt exist on the repo:

image

Just thought you would want to know 👍

mikecann avatar Jul 24 '18 01:07 mikecann

Hmm.. I'm going to check this and make sure that master is published. Thanks for letting me know.

lucasmafra avatar Jul 24 '18 01:07 lucasmafra