Skip to content

Commit

Permalink
fix: add type for tableProps
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Jun 11, 2024
1 parent 0bc1e3f commit b69c71d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 4 additions & 1 deletion packages/infra/src/lib/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import retry from 'p-retry'

export { BlockIndexClaimFetcher } from './block-index.js'

/** Properties for DynamoDB claims table. */
/**
* Properties for DynamoDB claims table.
* @type {import('sst/constructs').TableProps}
*/
export const tableProps = {
fields: {
claim: 'string',
Expand Down
8 changes: 1 addition & 7 deletions stacks/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import { tableProps } from '../packages/infra/src/lib/store/index.js'
* @param {import('sst/constructs').StackContext} config
*/
export function DB ({ stack }) {
const claimsTable = new Table(
stack,
'claims-v1',
/** @type {import('sst/constructs').TableProps} */
(tableProps)
)

const claimsTable = new Table(stack, 'claims-v1', tableProps)
return { claimsTable }
}

0 comments on commit b69c71d

Please sign in to comment.