caverav / auditforge

Detected usage of the any type JS-0323
Anti-pattern
Critical
11 days ago11 days old
Unexpected any. Specify a different type
 1const API_URL = 'https://localhost:4242/api/';
 2
 3export const getSettings = async (): Promise<any> => { 4  try {
 5    const response = await fetch(`${API_URL}settings`, {
 6      credentials: 'include',
Unexpected any. Specify a different type
 74    ext: string;
 75  };
 76
 77  const keyExtractor = (item: any) => item._id; 78
 79  const handleEditTemplateButton = (template: TableData) => {
 80    setNewTemplate(prevState => ({
Unexpected any. Specify a different type
 34    file: '',
 35  });
 36
 37  const [templates, setTemplates] = useState<any[]>([]); 38  const [_loading, setLoading] = useState<boolean>(true);
 39  const [_error, setError] = useState<string | null>(null);
 40
Unexpected any. Specify a different type
 81    logo: string;
 82  };
 83
 84  const keyExtractor = (item: any) => item._id; 85
 86  const handleEditCompanyButton = (company: TableData) => {
 87    setNewCompany({
Unexpected any. Specify a different type
 33    logo: '',
 34  });
 35
 36  const [companies, setCompanies] = useState<any[]>([]); 37  const [_loading, setLoading] = useState<boolean>(true);
 38  const [_error, setError] = useState<string | null>(null);
 39