dynamodb-toolbox
dynamodb-toolbox copied to clipboard
Add type for schema
I know this isn't 100% right because it is causing a few dozen typescript errors, but I think it is important to assign & export a type to Entity.schema
.
I'm using eslint rules that prohibit unsafe any usage and it seems that the schema property is generally well-defined.
@willsmanley might be fighting a losing battle here as any
is used extensively throughout the codebase, I think because it was initially developed in JS, then partially migrated to TS. You might be able to "fix" the schema
type but then you just run into a bunch of downstream typing issues that you'll probably never be able to resolve without rewriting most of the codebase!
Curious as to why you need to access the schema
property? I wonder if it should even be public.
You do have type inference now which might help?