Skip to content

Commit

Permalink
Merge pull request #596 from jeremydaly/fix-bug-in-timestamp-options
Browse files Browse the repository at this point in the history
fix: bug in timestamp options
  • Loading branch information
ThomasAribart committed Sep 25, 2023
2 parents 4a59afe + b435179 commit 662f8ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { isTimestampsObjectOptions } from './isTimestampsObjectOptions'
export type IsTimestampEnabled<
TIMESTAMP_OPTIONS extends TimestampsOptions,
TIMESTAMP extends 'created' | 'modified'
> = TIMESTAMP_OPTIONS extends true
? true
: TIMESTAMP_OPTIONS extends { [KEY in TIMESTAMP]: true | Record<string, never> }
> = TIMESTAMP_OPTIONS extends true | { [KEY in TIMESTAMP]: true | Record<string, unknown> }
? true
: false

Expand Down
2 changes: 2 additions & 0 deletions src/v1/playground/commands/getItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const mockedEntity = mockEntity(UserEntity)

mockedEntity.on(GetItemCommand).resolve({
Item: {
created: '2020-01-01T00:00:00.000Z',
modified: '2021-01-01T00:00:00.000Z',
userId: 'foo',
age: 42,
constant: 'toto',
Expand Down

0 comments on commit 662f8ed

Please sign in to comment.