Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/db/tests/query/select.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ describe(`select types`, () => {

const col = createLiveQueryCollection((q) =>
q.from({ u: spreadUsers }).select(({ u }) => {
const { nickname, ...withoutNickname } = u
const { nickname: _nickname, ...withoutNickname } = u
return { trimmed: withoutNickname }
}),
)

const result = col.toArray[0]!
const _result = col.toArray[0]!
// `nickname` was destructured out, so the projected object must
// not reintroduce the key.
type HasNickname = `nickname` extends keyof typeof result.trimmed
type HasNickname = `nickname` extends keyof typeof _result.trimmed
? true
: false
expectTypeOf<HasNickname>().toEqualTypeOf<false>()
Expand Down
Loading