mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
Vault Strict Typing cleanup (#12512)
* remove strict types from `NewDeviceVerificationNotice` - Add null default value for class properties - Enforce that the userId is passed - noticeState$ can return null * remove strict types from `CopyCipherFieldService` - refactor title to be a string rather than null * remove strict types from `PasswordRepromptComponent` - add guard to exit early on submit but also solves removing null/undefined from typing * use bang to ensure required input * remove strict types from `CopyCipherFieldDirective` - add bang for required types - add default values for null types * add bang for constant variables in cipher form stories * remove strict types from `DeleteAttachmentComponent` - add bang for required types - refactor title to be an empty string * fix tests
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||
|
||||
@@ -24,10 +22,10 @@ import {
|
||||
})
|
||||
export class DeleteAttachmentComponent {
|
||||
/** Id of the cipher associated with the attachment */
|
||||
@Input({ required: true }) cipherId: string;
|
||||
@Input({ required: true }) cipherId!: string;
|
||||
|
||||
/** The attachment that is can be deleted */
|
||||
@Input({ required: true }) attachment: AttachmentView;
|
||||
@Input({ required: true }) attachment!: AttachmentView;
|
||||
|
||||
/** Emits when the attachment is successfully deleted */
|
||||
@Output() onDeletionSuccess = new EventEmitter<void>();
|
||||
@@ -56,7 +54,7 @@ export class DeleteAttachmentComponent {
|
||||
|
||||
this.toastService.showToast({
|
||||
variant: "success",
|
||||
title: null,
|
||||
title: "",
|
||||
message: this.i18nService.t("deletedAttachment"),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user