1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【備忘録】TS環境下でSplideを動かす

1
Last updated at Posted at 2024-08-23

はじめに

TypeScript環境下でSplideを動かす備忘録です。
同じissueも存在します。

エラー内容

普通にimportしようとするとこうなります。
image.png

解決策

1.react-splide.d.ts を作成する
2.下記のように中身を記述する

react-splide.d.ts
declare module "@splidejs/react-splide";

さいごに

公式のアップデートはストップしていますが、有志が作ってくれていそうです。
下記リポジトリも解決策になると思われます。
ちなみに下記リポジトリだと型が使えました

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?