Conform src/components/views/messages/* code to strictNullChecks (#10461)

This commit is contained in:
Michael Telatynski 2023-03-29 08:22:35 +01:00 committed by GitHub
parent 7cb90d0f78
commit cefd94859c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 109 additions and 96 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
export type getIframeFn = () => HTMLIFrameElement; // eslint-disable-line @typescript-eslint/naming-convention
export type GetIframeFn = () => HTMLIFrameElement | null;
export const DEFAULT_STYLES = {
imgSrc: "",
@ -75,7 +75,7 @@ export class FileDownloader {
* @param iframeFn Function to get a pre-configured iframe. Set to null to have the downloader
* use a generic, hidden, iframe.
*/
public constructor(private iframeFn?: getIframeFn) {}
public constructor(private iframeFn?: GetIframeFn) {}
private get iframe(): HTMLIFrameElement {
const iframe = this.iframeFn?.();