fix type errors

This commit is contained in:
thislight 2025-01-04 17:10:54 +08:00
parent 99efa6b42c
commit 203eeb9761
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
7 changed files with 7 additions and 7 deletions

View file

@ -38,7 +38,7 @@ function clamp(input: number, min: number, max: number) {
}
const MediaViewer: ParentComponent<MediaViewerProps> = (props) => {
let rootRef: HTMLDialogElement;
let rootRef!: HTMLDialogElement;
type State = {
ref?: HTMLElement;

View file

@ -17,7 +17,7 @@ const PullDownToRefresh: Component<{
linkedElement?: HTMLElement;
onRefresh?: () => void;
}> = (props) => {
let rootElement: HTMLDivElement;
let rootElement!: HTMLDivElement;
const [pullDown, setPullDown] = createSignal(0);
const stopPos = () => 160;

View file

@ -23,7 +23,7 @@ type ChooseTootLangProps = {
};
const ChooseTootLang: Component<ChooseTootLangProps> = (props) => {
let listRef: HTMLUListElement;
let listRef!: HTMLUListElement;
const [t] = createTranslator(
(code) =>
import(`./i18n/${code}.json`) as Promise<{

View file

@ -17,7 +17,7 @@ export function PreviewCard(props: {
src: mastodon.v1.PreviewCard;
alwaysCompact?: boolean;
}) {
let root: HTMLAnchorElement;
let root!: HTMLAnchorElement;
createEffect(() => {
if (props.alwaysCompact) {

View file

@ -33,7 +33,7 @@ type TootPollProps = {
};
const TootPoll: Component<TootPollProps> = (props) => {
let list: HTMLUListElement;
let list!: HTMLUListElement;
const { vote } = useTootEnv();
const now = useTimeSource();