File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ export declare class CSInterface {
473473 *
474474 * @param event A CSEvent object.
475475 */
476- dispatchEvent ( event : CSEvent ) : void ;
476+ dispatchEvent < T extends CSEvent > ( event : T ) : void ;
477477 /**
478478 * Registers an interest in a CEP event of a particular type, and
479479 * assigns an event handler.
@@ -484,7 +484,7 @@ export declare class CSInterface {
484484 * @param listener The JavaScript handler function or method.
485485 * @param obj Optional, the object containing the handler method, if any. Default is null.
486486 */
487- addEventListener ( type : string , listener : ( evt : CSEvent ) => void , obj ?: object ) : void ;
487+ addEventListener < T extends CSEvent > ( type : string , listener : ( evt : T ) => void , obj ?: object ) : void ;
488488 /**
489489 * Removes a registered event listener.
490490 *
Original file line number Diff line number Diff line change @@ -505,7 +505,7 @@ export class CSInterface {
505505 *
506506 * @param event A CSEvent object.
507507 */
508- dispatchEvent ( event : CSEvent ) : void {
508+ dispatchEvent < T extends CSEvent > ( event : T ) : void {
509509 if ( typeof event . data == "object" ) {
510510 event . data = JSON . stringify ( event . data ) ;
511511 }
@@ -523,7 +523,7 @@ export class CSInterface {
523523 * @param listener The JavaScript handler function or method.
524524 * @param obj Optional, the object containing the handler method, if any. Default is null.
525525 */
526- addEventListener ( type : string , listener : ( evt : CSEvent ) => void , obj ?: object ) : void {
526+ addEventListener < T extends CSEvent > ( type : string , listener : ( evt : T ) => void , obj ?: object ) : void {
527527 window . __adobe_cep__ . addEventListener ( type , listener , obj ) ;
528528 }
529529
You can’t perform that action at this time.
0 commit comments