File: PowerSyncCollectionConfig.md | Updated: 11/15/2025
Search...
+ K
Auto
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide
Documentation
Framework
React
Version
Latest
Search...
+ K
Menu
Getting Started
Guides
Collections
Frameworks
Community
API Reference
Framework
React
Version
Latest
Menu
Getting Started
Guides
Collections
Frameworks
Community
API Reference
On this page
Copy Markdown
ts
type PowerSyncCollectionConfig<TTable, TSchema> = BasePowerSyncCollectionConfig<TTable, TSchema> &
| ConfigWithSQLiteTypes
| ConfigWithSQLiteInputType<TTable, TSchema>
| ConfigWithArbitraryCollectionTypes<TTable, TSchema>;
type PowerSyncCollectionConfig<TTable, TSchema> = BasePowerSyncCollectionConfig<TTable, TSchema> &
| ConfigWithSQLiteTypes
| ConfigWithSQLiteInputType<TTable, TSchema>
| ConfigWithArbitraryCollectionTypes<TTable, TSchema>;
Defined in: definitions.ts:222
Configuration options for creating a PowerSync collection.
Type Parameters
---------------
### TTable
TTable extends Table = Table
TSchema extends StandardSchemaV1<any> = never
typescript
const APP_SCHEMA = new Schema({
documents: new Table({
name: column.text,
}),
})
const db = new PowerSyncDatabase({
database: {
dbFilename: "test.sqlite",
},
schema: APP_SCHEMA,
})
const collection = createCollection(
powerSyncCollectionOptions({
database: db,
table: APP_SCHEMA.props.documents
})
)
const APP_SCHEMA = new Schema({
documents: new Table({
name: column.text,
}),
})
const db = new PowerSyncDatabase({
database: {
dbFilename: "test.sqlite",
},
schema: APP_SCHEMA,
})
const collection = createCollection(
powerSyncCollectionOptions({
database: db,
table: APP_SCHEMA.props.documents
})
)
