File tree Expand file tree Collapse file tree 3 files changed +2
-15
lines changed Expand file tree Collapse file tree 3 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -123,17 +123,8 @@ export function handler<E, T>(
123123 handler ?: ( event : E , props : T ) => any ,
124124) : HandlerFactory < T , E > {
125125 if ( typeof eventSchema === "function" ) {
126- if (
127- stateSchema && typeof stateSchema === "object" &&
128- "proxy" in stateSchema && stateSchema . proxy === true
129- ) {
130- handler = eventSchema ;
131- eventSchema = stateSchema = undefined ;
132- } else {
133- throw new Error (
134- "invalid handler, no schema provided - did you forget to enable CTS?" ,
135- ) ;
136- }
126+ handler = eventSchema ;
127+ eventSchema = stateSchema = undefined ;
137128 }
138129
139130 const schema : JSONSchema | undefined = eventSchema || stateSchema
Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ describe("module", () => {
100100 props . x = event . clientX ;
101101 props . y = event . clientY ;
102102 } ,
103- { proxy : true } ,
104103 ) ;
105104 expect ( typeof clickHandler ) . toBe ( "function" ) ;
106105 expect ( isModule ( clickHandler ) ) . toBe ( true ) ;
@@ -112,7 +111,6 @@ describe("module", () => {
112111 props . x = event . clientX ;
113112 props . y = event . clientY ;
114113 } ,
115- { proxy : true } ,
116114 ) ;
117115 const stream = clickHandler ( { x : opaqueRef ( 10 ) , y : opaqueRef ( 20 ) } ) ;
118116 expect ( isOpaqueRef ( stream ) ) . toBe ( true ) ;
@@ -203,7 +201,6 @@ describe("module", () => {
203201 props . x = event . clientX ;
204202 props . y = event . clientY ;
205203 } ,
206- { proxy : true } ,
207204 ) ;
208205 const stream = clickHandler . with ( { x : opaqueRef ( 10 ) , y : opaqueRef ( 20 ) } ) ;
209206 expect ( isOpaqueRef ( stream ) ) . toBe ( true ) ;
Original file line number Diff line number Diff line change 1- /// <cts-enable />
21import {
32 Cell ,
43 derive ,
You can’t perform that action at this time.
0 commit comments