franius8 / todo-site

Found unused variables in TypeScript code JS-0356
Performance
Major
a year agoa year old
'done' is assigned a value but never used. Allowed unused vars must match /^_/u
1// A generic object used for ToDos
2const todoobject = (heading: string, text: string, date: string, priority: string, iD:number, projectiDs:number[], done = false) => {3    return { heading, text, date, priority, iD, projectiDs};
4};
5
'docRef' is assigned a value but never used. Allowed unused vars must match /^_/u
13            if (user) {
14                const uid = user.uid;
15                try {
16                    const docRef = await updateDoc(doc(collection(db, "users"), uid), {17                        [type]: JSON.stringify(toDosCopy)
18                    });
19                } catch (e) {
'error' is defined but never used. Allowed unused args must match /^_/u
21                // Password reset email sent!
22                // ..
23            })
24            .catch((error) => {25
26
27                // ..
'error' is defined but never used. Allowed unused args must match /^_/u
39                });
40                // ...
41            })
42            .catch((error) => {43
44                // ..
45            });
'error' is defined but never used. Allowed unused args must match /^_/u
33                    displayName: name
34                }).then(() => {
35                   alert("User registered successfully");
36                }).catch((error) => {37                    // An error occurred
38                    // ...
39                });