mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +00:00
Fix build errors for strict templates (#4134)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
export type InputTypes = "text" | "password" | "number" | "datetime-local" | "email" | "checkbox";
|
||||
|
||||
export abstract class BitFormFieldControl {
|
||||
ariaDescribedBy: string;
|
||||
id: string;
|
||||
@@ -5,7 +7,7 @@ export abstract class BitFormFieldControl {
|
||||
required: boolean;
|
||||
hasError: boolean;
|
||||
error: [string, any];
|
||||
type?: "text" | "password";
|
||||
type?: InputTypes;
|
||||
spellcheck?: boolean;
|
||||
focus?: () => void;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Directive, ElementRef, HostBinding, Input, NgZone, Optional, Self } from "@angular/core";
|
||||
import { NgControl, Validators } from "@angular/forms";
|
||||
|
||||
import { BitFormFieldControl } from "../form-field/form-field-control";
|
||||
import { BitFormFieldControl, InputTypes } from "../form-field/form-field-control";
|
||||
|
||||
// Increments for each instance of this component
|
||||
let nextId = 0;
|
||||
@@ -45,7 +45,7 @@ export class BitInputDirective implements BitFormFieldControl {
|
||||
return this.hasError ? true : undefined;
|
||||
}
|
||||
|
||||
@HostBinding("attr.type") @Input() type?: "text" | "password";
|
||||
@HostBinding("attr.type") @Input() type?: InputTypes;
|
||||
|
||||
@HostBinding("attr.spellcheck") @Input() spellcheck?: boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user