@@ -59,7 +59,7 @@ export type RuntimeHostConstructionOptions = {
5959 codec : CodecPort ;
6060 trustCrypto ?: TrustCryptoPort ;
6161 seekCache ?: SeekCachePort ;
62- stateCache ?: WarpStateCachePort ;
62+ stateCache ?: WarpStateCachePort | null ;
6363 audit ?: boolean ;
6464 blobStorage ?: BlobStoragePort ;
6565 patchBlobStorage ?: BlobStoragePort ;
@@ -90,7 +90,7 @@ export type RuntimeHostOpenOptions = {
9090 codec ?: CodecPort ;
9191 trustCrypto ?: TrustCryptoPort ;
9292 seekCache ?: SeekCachePort ;
93- stateCache ?: WarpStateCachePort ;
93+ stateCache ?: WarpStateCachePort | null ;
9494 audit ?: boolean ;
9595 blobStorage ?: BlobStoragePort ;
9696 patchBlobStorage ?: BlobStoragePort ;
@@ -120,7 +120,7 @@ export class WarpOpenOptions {
120120 readonly codec ?: CodecPort ;
121121 readonly trustCrypto ?: TrustCryptoPort ;
122122 readonly seekCache ?: SeekCachePort ;
123- readonly stateCache ?: WarpStateCachePort ;
123+ readonly stateCache ?: WarpStateCachePort | null ;
124124 readonly audit ?: boolean ;
125125 readonly blobStorage ?: BlobStoragePort ;
126126 readonly patchBlobStorage ?: BlobStoragePort ;
@@ -350,7 +350,7 @@ export async function resolveRuntimeHostConstructionOptions(
350350 let resolvedStateCache : WarpStateCachePort | undefined ;
351351 if ( stateCache !== undefined && stateCache !== null ) {
352352 resolvedStateCache = stateCache ;
353- } else if ( typeof persistence . createRuntimeStateCache === 'function' ) {
353+ } else if ( stateCache !== null && typeof persistence . createRuntimeStateCache === 'function' ) {
354354 resolvedStateCache = await persistence . createRuntimeStateCache ( {
355355 graphName,
356356 codec : resolvedCodec ,
0 commit comments