añadido tipo de dato a filtrarImagen
This commit is contained in:
1 parent
d08d2521b6
commit
8654963071
1 file changed
+1
-1
+1
-1
@@ -12,7 +12,7 @@ export type WithoutChildren<T> = T extends { children?: any } ? Omit<T, 'childre
|
||||
export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
|
||||
export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & { ref?: U | null };
|
||||
|
||||
export function filtrarImagen(file) {
|
||||
export function filtrarImagen(file: File) {
|
||||
if (file) {
|
||||
const allowed = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif', 'image/webp'];
|
||||
if (allowed.includes(file.type)) {
|
||||
|
||||
Reference in new issue
Block a user