type-dynamo
type-dynamo copied to clipboard
Not pushed to npm?
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:
Just thought you would want to know 👍
Hmm.. I'm going to check this and make sure that master is published. Thanks for letting me know.