Skip to content

Commit 6b10a37

Browse files
committed
[types] Import fixes
1 parent bdf35a7 commit 6b10a37

File tree

13 files changed

+29
-26
lines changed

13 files changed

+29
-26
lines changed

src/@types/persisters/persister-partykit-client/docs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* then gets the PartySocket back out again.
4444
*
4545
* ```js yolo
46-
* import PartySocket from 'partysocket';
46+
* import {PartySocket} from 'partysocket';
4747
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
4848
* import {createStore} from 'tinybase';
4949
*
@@ -162,7 +162,7 @@
162162
* browser's IndexedDB storage.
163163
*
164164
* ```js yolo
165-
* import PartySocket from 'partysocket';
165+
* import {PartySocket} from 'partysocket';
166166
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
167167
* import {createStore} from 'tinybase';
168168
*

test/unit/core/ui-react/hooks.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import type {
77
MapCell,
88
MapValue,
99
MergeableStore,
10-
Persister,
1110
Row,
1211
Store,
13-
Synchronizer,
1412
Table,
1513
Tables,
1614
Value,
@@ -151,6 +149,8 @@ import {
151149
createRelationships,
152150
createStore,
153151
} from 'tinybase';
152+
import type {Persister} from 'tinybase/persisters';
153+
import type {Synchronizer} from 'tinybase/synchronizers';
154154
import {createFilePersister} from 'tinybase/persisters/persister-file';
155155
import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
156156
import {jest} from '@jest/globals';

test/unit/persisters/automerge.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import {
33
resetNetwork,
44
} from '../common/automerge-adaptor.ts';
55
import {DocHandle, Repo} from '@automerge/automerge-repo';
6-
import type {Persister, Store} from 'tinybase';
6+
import type {Persister} from 'tinybase/persisters';
7+
import type {Store} from 'tinybase';
78
import {createAutomergePersister} from 'tinybase/persisters/persister-automerge';
89
import {createStore} from 'tinybase';
910
import {pause} from '../common/other.ts';

test/unit/persisters/common/databases.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
import 'fake-indexeddb/auto';
22
import {Client, createClient} from '@libsql/client';
3-
import {
4-
type DatabasePersisterConfig,
5-
type Persister,
6-
type Store,
7-
getUniqueId,
8-
} from 'tinybase';
3+
import type {DatabasePersisterConfig, Persister} from 'tinybase/persisters';
94
import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
105
import type {
116
QueryResult,
127
SQLWatchOptions,
138
WatchOnChangeEvent,
149
} from '@powersync/common';
1510
import type {ReservedSql, Sql} from 'postgres';
11+
import {type Store, getUniqueId} from 'tinybase';
1612
import initWasm, {DB} from '@vlcn.io/crsqlite-wasm';
1713
import sqlite3, {Database} from 'sqlite3';
1814
import {DbSchema} from 'electric-sql/client/model';

test/unit/persisters/common/mocks.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
import type {
22
Changes,
33
Content,
4-
DatabasePersisterConfig,
54
Id,
65
MergeableChanges,
76
MergeableContent,
87
MergeableStore,
9-
Persister,
10-
PersisterListener,
11-
Persists,
12-
Receive,
138
Store,
14-
Synchronizer,
159
Tables,
1610
Values,
1711
} from 'tinybase';
12+
import type {
13+
DatabasePersisterConfig,
14+
Persister,
15+
PersisterListener,
16+
Persists,
17+
} from 'tinybase/persisters';
1818
import {DocHandle, Repo} from '@automerge/automerge-repo';
1919
import {GetLocationMethod, Persistable} from './other.ts';
20+
import type {Receive, Synchronizer} from 'tinybase/synchronizers';
2021
import {Doc as YDoc, Map as YMap} from 'yjs';
2122
import {
2223
createLocalPersister,

test/unit/persisters/common/other.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import type {
44
MergeableChanges,
55
MergeableContent,
66
MergeableStore,
7-
Persister,
8-
Persists,
97
Store,
108
} from 'tinybase';
9+
import type {Persister, Persists} from 'tinybase/persisters';
1110
import {pause} from '../../common/other.ts';
1211

1312
export type GetLocationMethod<Location = string> = [

test/unit/persisters/database/json.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/* eslint-disable max-len */
22
import 'fake-indexeddb/auto';
33
import {ALL_VARIANTS, getDatabaseFunctions} from '../common/databases.ts';
4-
import type {Persister, Store} from 'tinybase';
54
import {mockFetchWasm, pause} from '../../common/other.ts';
5+
import type {Persister} from 'tinybase/persisters';
6+
import type {Store} from 'tinybase';
67
import {createStore} from 'tinybase';
78

89
describe.each(Object.entries(ALL_VARIANTS))(

test/unit/persisters/database/mergeable-json.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/* eslint-disable max-len */
22
import 'fake-indexeddb/auto';
33
import {MERGEABLE_VARIANTS, getDatabaseFunctions} from '../common/databases.ts';
4-
import type {MergeableStore, Persister} from 'tinybase';
54
import {mockFetchWasm, pause} from '../../common/other.ts';
5+
import type {MergeableStore} from 'tinybase';
6+
import type {Persister} from 'tinybase/persisters';
67
import {createMergeableStore} from 'tinybase';
78
import {resetHlc} from '../../common/mergeable.ts';
89

test/unit/persisters/database/tabular.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
/* eslint-disable max-len */
33
import 'fake-indexeddb/auto';
44
import {ALL_VARIANTS, getDatabaseFunctions} from '../common/databases.ts';
5-
import type {Persister, Store} from 'tinybase';
65
import {mockFetchWasm, pause} from '../../common/other.ts';
6+
import type {Persister} from 'tinybase/persisters';
7+
import type {Store} from 'tinybase';
78
import {createStore} from 'tinybase';
89

910
describe.each(Object.entries(ALL_VARIANTS))(

test/unit/persisters/mergeable.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import type {
66
MergeableChanges,
77
MergeableContent,
88
MergeableStore,
9-
Persister,
109
} from 'tinybase';
1110
import {GetLocationMethod, Persistable, nextLoop} from './common/other.ts';
1211
import {Persists, createCustomPersister} from 'tinybase/persisters';
@@ -23,6 +22,7 @@ import {
2322
mockSessionStorage,
2423
} from './common/mocks.ts';
2524
import {MERGEABLE_VARIANTS} from './common/databases.ts';
25+
import type {Persister} from 'tinybase/persisters';
2626
import {pause} from '../common/other.ts';
2727
import {resetHlc} from '../common/mergeable.ts';
2828

0 commit comments

Comments
 (0)