{"record":{"id":"608354caffe42ca9","repo":"clockworklabs/SpacetimeDB","slug":"multiple-schemas-are-not-supported","errorCode":null,"errorMessage":"multiple schemas are not supported","messagePattern":"multiple schemas are not supported","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"crates/bindings-typescript/src/server/schema.ts","lineNumber":725,"sourceCode":"export const exportContext = Symbol('SpacetimeDB.exportContext');\n\nexport interface ModuleExport {\n  [registerExport](ctx: SchemaInner, exportName: string): void;\n  [exportContext]?: SchemaInner;\n}\n\nfunction isModuleExport(x: unknown): x is ModuleExport {\n  return (\n    (typeof x === 'function' || typeof x === 'object') &&\n    x !== null &&\n    registerExport in x\n  );\n}\n\n/** Verify that the ModuleContext that `exp` comes from is the same as `schema` */\nfunction checkExportContext(exp: ModuleExport, schema: SchemaInner) {\n  if (exp[exportContext] != null && exp[exportContext] !== schema) {\n    throw new TypeError('multiple schemas are not supported');\n  }\n}\n\n/**\n * Extracts the inferred schema type from a Schema instance\n */\nexport type InferSchema<SchemaDef extends Schema<any>> =\n  SchemaDef extends Schema<infer S> ? S : never;\n\n/**\n * Creates a schema from table definitions\n * @param handles - Array of table handles created by table() function\n * @returns ColumnBuilder representing the complete database schema\n * @example\n * ```ts\n * const spacetimedb = schema({\n *   user: table({}, userType),\n *   post: table({}, postType)","sourceCodeStart":707,"sourceCodeEnd":743,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings-typescript/src/server/schema.ts#L707-L743","documentation":"Error \"multiple schemas are not supported\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/bindings-typescript/src/server/schema.ts:725 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}