tbonelee commented on code in PR #5080:
URL: https://github.com/apache/zeppelin/pull/5080#discussion_r2388233159
##########
zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts:
##########
@@ -242,6 +218,56 @@ export class NotebookParagraphCodeEditorComponent
implements OnChanges, OnDestro
});
}
+ handleKeyEvent(action: ParagraphActions, event: NullableKeyboardEvent) {
+ const handlerName = ParagraphActionToHandlerName[action];
+ const handlerFn = handlerName && handlerName in this && this[handlerName
as keyof MonacoKeyboardEventHandler];
+ if (!handlerFn) {
Review Comment:
Thanks! I added the function type guard you suggested. I also replaced the
unnecessarily narrow type assertion with a minimal one that simply conveys what
the compiler can’t infer, keeping behavior the same while reducing unsound
narrowing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]