Fix some typing errors

This commit is contained in:
Nikita Karamov 2023-03-18 04:52:41 +01:00
parent effac10b7e
commit f5cbb082ed
No known key found for this signature in database
GPG key ID: 41D6F71EE78E77CD

View file

@ -17,7 +17,7 @@ const { prefilledInstance } = Astro.props;
--- ---
<datalist id="instanceDatalist"> <datalist id="instanceDatalist">
{instances.map((instance) => <option value={instance} />)} {instances.map((instance: string) => <option value={instance} />)}
</datalist> </datalist>
<label id="s2f-instanceContainer"> <label id="s2f-instanceContainer">
Fediverse instance Fediverse instance
@ -81,9 +81,11 @@ const { prefilledInstance } = Astro.props;
const LOCAL_STORAGE_KEY = "recentInstances"; const LOCAL_STORAGE_KEY = "recentInstances";
const RECENT_INSTANCES_SIZE = 5; const RECENT_INSTANCES_SIZE = 5;
const $form = document.querySelector("#js-s2f-form"); const $form = document.querySelector("#js-s2f-form") as HTMLFormElement;
const $instanceContainer = document.querySelector("#s2f-instanceContainer"); const $instanceContainer = document.querySelector(
const $instance: HTMLInputElement = document.querySelector("#instance"); "#s2f-instanceContainer",
) as HTMLLabelElement;
const $instance = document.querySelector("#instance") as HTMLInputElement;
const getSavedInstances = (): Array<string> => { const getSavedInstances = (): Array<string> => {
const storageValue = window.localStorage.getItem(LOCAL_STORAGE_KEY); const storageValue = window.localStorage.getItem(LOCAL_STORAGE_KEY);