Skip to content

Commit

Permalink
specify type import
Browse files Browse the repository at this point in the history
  • Loading branch information
onx2 committed Aug 10, 2024
1 parent 143a299 commit fe3af17
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/solid/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import { ItemResizeObserver } from "../core/resizer";
import { isRTLDocument } from "../core/environment";
import {
Component,
JSX,
type Component,
type JSX,
createEffect,
createMemo,
mergeProps,
Expand Down
12 changes: 6 additions & 6 deletions src/solid/RangedFor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
createRoot,
createSignal,
onCleanup,
JSX,
Signal,
Accessor,
type JSX,
type Signal,
type Accessor,
} from "solid-js";
import { ItemsRange } from "../core/types";
import type { ItemsRange } from "../core/types";

interface RenderedNode<T> {
_data: Signal<T>;
Expand Down Expand Up @@ -58,12 +58,12 @@ export const RangedFor = <T,>(props: {
_dispose: dispose,
});
return result;
})
}),
);
if (lookup) {
if (newData !== lookup._data) {
lookup._data[1](
newData as Exclude<T, Function> // TODO improve type
newData as Exclude<T, Function>, // TODO improve type
);
}
current.set(i, lookup);
Expand Down
8 changes: 4 additions & 4 deletions src/solid/VList.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* @jsxImportSource solid-js
*/
import { JSX, splitProps } from "solid-js";
import { ViewportComponentAttributes } from "./types";
import { type JSX, splitProps } from "solid-js";
import type { ViewportComponentAttributes } from "./types";
import {
Virtualizer,
VirtualizerHandle,
VirtualizerProps,
type VirtualizerHandle,
type VirtualizerProps,
} from "./Virtualizer";

/**
Expand Down
4 changes: 2 additions & 2 deletions src/solid/Virtualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
createEffect,
createSignal,
createMemo,
JSX,
type JSX,
on,
createComputed,
type ValidComponent,
Expand All @@ -28,7 +28,7 @@ import {
} from "../core/store";
import { createResizer } from "../core/resizer";
import { createScroller } from "../core/scroller";
import { ItemsRange, ScrollToIndexOpts } from "../core/types";
import type { ItemsRange, ScrollToIndexOpts } from "../core/types";
import { ListItem } from "./ListItem";
import { RangedFor } from "./RangedFor";
import { isSameRange } from "./utils";
Expand Down
4 changes: 2 additions & 2 deletions src/solid/WindowVirtualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
createEffect,
createSignal,
createMemo,
JSX,
type JSX,
on,
createComputed,
mergeProps,
Expand All @@ -26,7 +26,7 @@ import { createWindowScroller } from "../core/scroller";
import { ListItem } from "./ListItem";
import { RangedFor } from "./RangedFor";
import { isSameRange } from "./utils";
import { ItemsRange } from "../core/types";
import type { ItemsRange } from "../core/types";

// /**
// * Methods of {@link WindowVirtualizer}.
Expand Down

0 comments on commit fe3af17

Please sign in to comment.