@@ -34,7 +34,7 @@ describe('Channel function definitions', () => {
3434 defineChannelFunction ( { name : 'notify' , type : 'event' } )
3535 defineChannelFunction ( { name : 'load' , handler : ( ) => 'value' } )
3636 defineChannelFunction ( { name : 'load' , type : 'query' , handler : ( ) => 'value' } )
37- defineChannelFunction ( { name : 'save' , type : 'action' , handler : ( ) => { } } )
37+ defineChannelFunction ( { name : 'save' , type : 'action' , handler : ( ) => { } } )
3838 } )
3939
4040 it ( 'requires handlers for request/response functions' , ( ) => {
@@ -51,7 +51,7 @@ describe('In-page script channel', () => {
5151 functions : {
5252 echo : { handler : value => value } ,
5353 sum : { handler : ( a , b ) => a + b } ,
54- save : { handler : ( ) => { } } ,
54+ save : { handler : ( ) => { } } ,
5555 } ,
5656 } )
5757
@@ -82,13 +82,13 @@ describe('In-page script channel', () => {
8282 } )
8383 } )
8484
85- it ( 'requires every in-page- script function' , ( ) => {
85+ it ( 'requires every in-page script function' , ( ) => {
8686 // @ts -expect-error `functions` is required.
8787 createPageScriptChannel < TestProtocol > ( { name : 'devframes:test' } )
8888
8989 createPageScriptChannel < TestProtocol > ( {
9090 name : 'devframes:test' ,
91- // @ts -expect-error `sum` and `save` are required
91+ // @ts -expect-error `sum` and `save` are required.
9292 functions : {
9393 echo : { handler : value => value } ,
9494 } ,
@@ -123,7 +123,7 @@ describe('In-page script channel', () => {
123123 functions : {
124124 echo : { handler : value => value } ,
125125 sum : { handler : ( a , b ) => a + b } ,
126- save : { handler : ( ) => { } } ,
126+ save : { handler : ( ) => { } } ,
127127 // @ts -expect-error `notify` is implemented by panels.
128128 notify : { handler : ( message : string ) => void message } ,
129129 } ,
@@ -139,7 +139,7 @@ describe('In-page script channel', () => {
139139 handler : ( value : number ) => value ,
140140 } ,
141141 sum : { handler : ( a , b ) => a + b } ,
142- save : { handler : ( ) => { } } ,
142+ save : { handler : ( ) => { } } ,
143143 } ,
144144 } )
145145 } )
@@ -206,9 +206,9 @@ describe('In-page script channel', () => {
206206
207207 expectTypeOf ( unsubscribe ) . toEqualTypeOf < ( ) => void > ( )
208208 // @ts -expect-error Panel functions cannot be handled by the page script.
209- channel . on ( 'notify' , ( ) => { } )
209+ channel . on ( 'notify' , ( ) => { } )
210210 // @ts -expect-error Query functions cannot be handled as events.
211- channel . on ( 'echo' , ( ) => { } )
211+ channel . on ( 'echo' , ( ) => { } )
212212 // @ts -expect-error `save` listeners receive a string.
213213 channel . on ( 'save' , ( value : number ) => void value )
214214 } )
@@ -229,7 +229,7 @@ describe('In-page script channel', () => {
229229
230230 it ( 'rejects panel channel events' , ( ) => {
231231 // @ts -expect-error Unknown in-page script channel lifecycle event.
232- channel . events . on ( 'status:updated' , ( ) => { } )
232+ channel . events . on ( 'status:updated' , ( ) => { } )
233233 } )
234234 } )
235235} )
@@ -238,7 +238,7 @@ describe('Panel channel', () => {
238238 const channel = connectPanelChannel < TestProtocol > ( {
239239 name : 'devframes:test' ,
240240 functions : {
241- notify : { handler : ( ) => { } } ,
241+ notify : { handler : ( ) => { } } ,
242242 } ,
243243 } )
244244
@@ -292,7 +292,7 @@ describe('Panel channel', () => {
292292 connectPanelChannel < TestProtocol > ( {
293293 name : 'devframes:test' ,
294294 functions : {
295- notify : { handler : ( ) => { } } ,
295+ notify : { handler : ( ) => { } } ,
296296 // @ts -expect-error `echo` is implemented by the in-page script.
297297 echo : { handler : ( value : string ) => value } ,
298298 } ,
@@ -321,7 +321,7 @@ describe('Panel channel', () => {
321321 name : 'devframes:page-script-only' ,
322322 functions : {
323323 // @ts -expect-error The protocol has no panel functions.
324- notify : { handler : ( ) => { } } ,
324+ notify : { handler : ( ) => { } } ,
325325 } ,
326326 } )
327327 } )
@@ -375,7 +375,7 @@ describe('Panel channel', () => {
375375
376376 expectTypeOf ( unsubscribe ) . toEqualTypeOf < ( ) => void > ( )
377377 // @ts -expect-error Page-script functions cannot be handled by the panel.
378- channel . on ( 'echo' , ( ) => { } )
378+ channel . on ( 'echo' , ( ) => { } )
379379 // @ts -expect-error `notify` listeners receive a string.
380380 channel . on ( 'notify' , ( message : number ) => void message )
381381 } )
@@ -389,9 +389,9 @@ describe('Panel channel', () => {
389389 } ,
390390 } )
391391
392- mixedChannel . on ( 'notify' , ( ) => { } )
392+ mixedChannel . on ( 'notify' , ( ) => { } )
393393 // @ts -expect-error Query functions cannot be handled as events.
394- mixedChannel . on ( 'confirm' , ( ) => { } )
394+ mixedChannel . on ( 'confirm' , ( ) => { } )
395395 } )
396396
397397 it ( 'types status events' , ( ) => {
@@ -404,7 +404,7 @@ describe('Panel channel', () => {
404404
405405 it ( 'rejects in-page script channel events and incompatible listeners' , ( ) => {
406406 // @ts -expect-error Unknown panel channel lifecycle event.
407- channel . events . on ( 'panel:connected' , ( ) => { } )
407+ channel . events . on ( 'panel:connected' , ( ) => { } )
408408 // @ts -expect-error `status:updated` listeners receive the status.
409409 channel . events . on ( 'status:updated' , ( status : number ) => void status )
410410 } )
0 commit comments