Comments (3)
yeah I think that would work! thanks!
from dynamodb-onetable.
Looks like TypeScript does not accept the package.json exports declaration required to resolve Dynamo.
Can you use the V2 SDK in the interim?
We are exploring exporting Dynamo as part of the index.js export symbols. Stay tuned.
from dynamodb-onetable.
Looks like we can export the Dynamo class from the index.js without breaking compatibility with the way existing non-typescript users are importing it. Yea!
The initialization sequence would then look like:
import {Dynamo, Table} from 'dynamodb-onetable'
import {DynamoDBClient} from '@aws-sdk/client-dynamodb'
const client = new Dynamo({client: new DynamoDBClient(params)})
If you want to try this in parallel with us, the index.js looks like:
import Dynamo from './Dynamo.js'
import { Expression } from './Expression.js'
import { Model } from './Model.js'
import { Table } from './Table.js'
export { Dynamo, Expression, Model, Table }
and index.d.ts:
import Dynamo from './Dynamo'
import { AnyEntity, AnyModel, Entity, Model, OneParams, OneProperties } from './Model'
import { Table } from './Table'
export { AnyEntity, AnyModel, Dynamo, Entity, Model, OneParams, OneProperties, Table }
The package.json can keep (for now) the export of ./Dynamo for non-typescript users.
I like this updated import sequence. We would change the doc to reflect this as the preferred V3 initialization I think.
Thoughts?
from dynamodb-onetable.
Related Issues (20)
- Error on pagination query HOT 3
- count: true param is not returning count value HOT 7
- BatchWrite does not handle Unprocessed Items correctly and ignores them HOT 1
- "?boolean" in Table.d.ts triggers typescript build error HOT 2
- model.upsert({ ...data }) returns a data with encrypted values HOT 2
- Need release to resolve Typescript ESM Resolution issues HOT 2
- params.fields are not respected when using table.getItem() or table.queryItems()
- Metrics.d.ts should not include function interfaces declared as 'async' HOT 7
- Improve: Prohibit the removal of nested object required fields. HOT 1
- Feature: Across entities query HOT 3
- Empty strings are filtered out HOT 2
- Cannot resolve type when ESM HOT 3
- Compound global index not updated if only 1 of 2 properties passed to the update function HOT 1
- Updating unique template field does not remove unique record HOT 2
- "CredentialsProviderError: The SSO session associated with this profile has expired" in "overview" sample... HOT 2
- Create method does not create the sort key if one attribute is undefined HOT 4
- Connecting OneTable to a local dynamodb instance
- Support for Mapped Types HOT 3
- Please Help: Update Problem (referenced attribute) HOT 3
- OneSchema type for getCurrentSchema() not set HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamodb-onetable.