Skip to content

Commit 08b91db

Browse files
chore(igxMask): specify types to private getters
1 parent 924d5d1 commit 08b91db

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

projects/igniteui-angular/src/lib/directives/mask/mask.directive.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ export class IgxMaskDirective implements OnInit, AfterViewChecked, ControlValueA
114114
return this.nativeElement.selectionEnd;
115115
}
116116

117-
private get nativeElement() {
117+
private get nativeElement(): HTMLInputElement {
118118
return this.elementRef.nativeElement;
119119
}
120120

121-
private get clipboardData() {
121+
private get clipboardData(): string {
122122
return this.inputValue.substring(this._cursor, this.selectionStart);
123123
}
124124

125-
private get valueToParse() {
125+
private get valueToParse(): string {
126126
if (this._hasDropAction) {
127127
return this._droppedData;
128128
}
@@ -161,12 +161,11 @@ export class IgxMaskDirective implements OnInit, AfterViewChecked, ControlValueA
161161
/** @hidden */
162162
@HostListener('keydown', ['$event'])
163163
public onKeyDown(event): void {
164-
const key = event.keyCode || event.charCode;
165-
166164
if (isIE() && this._stopPropagation) {
167165
this._stopPropagation = false;
168166
}
169167

168+
const key = event.keyCode || event.charCode;
170169
if ((key === KEYCODES.Ctrl && key === KEYCODES.Z) || (key === KEYCODES.Ctrl && key === KEYCODES.Y)) {
171170
event.preventDefault();
172171
}

0 commit comments

Comments
 (0)