chris-armstrong / dynaglue

Make DynamoDB single-table designs easier to query and update
Apache License 2.0
77 stars 6 forks source link

Typescript error referencing @internal type #7

Closed crumley closed 3 years ago

crumley commented 3 years ago

Nice library! The concept is great and the docs + api are great too.

In trying it out typescript complains about an exception type (non-internal) referencing an internal type. Full error:

node_modules/dynaglue/dist/declarations/base/exceptions.d.ts:2:10 - error TS2305: Module '"./conditions_types"' has no exported member 'ParseElement'.

It's unclear to me if this is a typescript issue or if the @internal tag needs to be applied to the constructor arg referencing ParseElement? Also possible this is user error.

Version: 0.1.0-alpha.25 Typescript: 4.1.3

chris-armstrong commented 3 years ago

Thanks! I've pushed a new version (alpha.26) which should address this issue. Please let me know if you find any more of these 'hidden' referenced types, as they can be a bit of a nuisance and Typescript is incapable at identifying referenced @internal types on externally exposed objects.

crumley commented 3 years ago

Works great, thank you!