Skip to content

Commit

Permalink
fixup type test and types imports
Browse files Browse the repository at this point in the history
  • Loading branch information
wernst committed Jun 14, 2024
1 parent d69b273 commit eaed45d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/db/src/db-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import {
validateIdentifier,
convertEntityToJS,
} from './collection-query.js';
import { Logger } from '@triplit/types/src/logger.js';
import { Logger } from '@triplit/types/logger';
import { prefixVariables } from './utils.js';
import { FetchResult } from './query/types';

Expand Down
2 changes: 1 addition & 1 deletion packages/db/src/db-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ import {
} from './triple-store-utils.js';
import { TripleStoreApi } from './triple-store.js';
import { RecordType } from './data-types/record.js';
import { Logger } from '@triplit/types/src/logger.js';
import { Logger } from '@triplit/types/logger';
import {
Unalias,
FetchResultEntityFromParts,
Expand Down
2 changes: 1 addition & 1 deletion packages/db/src/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
import { copyHooks, prefixVariables, triplesToObject } from './utils.js';
import { EAV, indexToTriple, TripleRow } from './triple-store-utils.js';
import { TripleStore } from './triple-store.js';
import { Logger } from '@triplit/types/src/logger.js';
import { Logger } from '@triplit/types/logger';

Check failure on line 47 in packages/db/src/db.ts

View workflow job for this annotation

GitHub Actions / test

Unhandled error

TypeCheckError: Cannot find module '@triplit/types/logger' or its corresponding type declarations. ❯ src/db.ts:47:24
import { isAnyOrUndefined } from './utility-types.js';
import { Unalias, FetchResult, FetchResultEntity } from './query/types';

Expand Down
7 changes: 5 additions & 2 deletions packages/db/test/typecheck/query.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import {
WhereFilter,
} from '../../src/query.js';
import { DBTransaction } from '../../src/db-transaction.js';
import { FetchResultEntity } from '../../src/query/types';
import {
CollectionQueryDefault,
FetchResultEntity,
} from '../../src/query/types';

function fakeTx<M extends Models<any, any> | undefined>(
db: DB<M>
Expand Down Expand Up @@ -799,7 +802,7 @@ describe('query builder', () => {
.toEqualTypeOf<
| ValueCursor
| FetchResultEntity<
CollectionQuery<typeof schema.collections, 'test'>
CollectionQueryDefault<typeof schema.collections, 'test'>
>
| undefined
>();
Expand Down

0 comments on commit eaed45d

Please sign in to comment.