@@ -12,11 +12,11 @@ import {
1212import { hashString } from '../utils/hashString'
1313import { getPublishedId , insecureRandomId } from '../utils/ids'
1414import { projectionStore } from './projectionStore'
15- import { type ProjectionStoreState , type ProjectionValuePending , type ValidProjection } from './types'
15+ import { type ProjectionStoreState , type ProjectionValuePending } from './types'
1616import { PROJECTION_STATE_CLEAR_DELAY , STABLE_EMPTY_PROJECTION , validateProjection } from './util'
1717
1818export interface ProjectionOptions <
19- TProjection extends ValidProjection = ValidProjection ,
19+ TProjection extends string = string ,
2020 TDocumentType extends string = string ,
2121 TDataset extends string = string ,
2222 TProjectId extends string = string ,
@@ -28,7 +28,7 @@ export interface ProjectionOptions<
2828 * @beta
2929 */
3030export function getProjectionState <
31- TProjection extends ValidProjection = ValidProjection ,
31+ TProjection extends string = string ,
3232 TDocumentType extends string = string ,
3333 TDataset extends string = string ,
3434 TProjectId extends string = string ,
@@ -75,13 +75,13 @@ export const _getProjectionState = bindActionByDataset(
7575 createStateSourceAction ( {
7676 selector : (
7777 { state} : SelectorContext < ProjectionStoreState > ,
78- options : ProjectionOptions < ValidProjection , string , string , string > ,
78+ options : ProjectionOptions < string , string , string , string > ,
7979 ) : ProjectionValuePending < object > | undefined => {
8080 const documentId = getPublishedId ( options . documentId )
8181 const projectionHash = hashString ( options . projection )
8282 return state . values [ documentId ] ?. [ projectionHash ] ?? STABLE_EMPTY_PROJECTION
8383 } ,
84- onSubscribe : ( { state} , options : ProjectionOptions < ValidProjection , string , string , string > ) => {
84+ onSubscribe : ( { state} , options : ProjectionOptions < string , string , string , string > ) => {
8585 const { projection, ...docHandle } = options
8686 const subscriptionId = insecureRandomId ( )
8787 const documentId = getPublishedId ( docHandle . documentId )
0 commit comments