fix type errors

pull/7/head
Gabi Purcaru 2022-12-20 14:21:18 +00:00
rodzic 4b6116663b
commit 63aa9d503e
3 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -4,7 +4,7 @@ import sanitizeHtml from 'sanitize-html';
type AccountDetails = {
id: string, // IMPORTANT: this is int64 so will overflow Javascript's number type
acct: string,
followed_by: [string], // list of handles
followed_by: Array<string>, // list of handles
};
async function usernameToId(handle: string): Promise<{ id: number, domain: string }> {
@ -125,8 +125,8 @@ export function Content({ }) {
const [follows, setfollows] = useState<Array<AccountDetails>>([]);
const [isLoading, setLoading] = useState(false);
const [isDone, setDone] = useState(false);
const [domain, setDomain] = useState();
const [[numLoaded, totalToLoad], setProgress] = useState([0, 0]);
const [domain, setDomain] = useState<string>("");
const [[numLoaded, totalToLoad], setProgress] = useState<Array<number>>([0, 0]);
console.log(follows.length);

Wyświetl plik

@ -29,7 +29,7 @@ export function FAQ({ }) {
</section>;
}
function FAQItem({ defaultSelected, title, children }) {
function FAQItem({ defaultSelected, title, children }: { defaultSelected?: boolean, title: string, children: React.ReactNode}) {
const [selected, setSelected] = useState(defaultSelected);
return (<>
<h3 id="accordion-flush-heading-1">

Wyświetl plik

@ -4,7 +4,7 @@
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,