Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

SwitchProps interface is not exported

オープン
#57 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript, react, typescript
領域
frontend

調査の方向性

まず pull request #56 と、lib/index にある SwitchProps の定義およびエクスポートを確認します。インターフェースが公開エクスポートされ、styled Switch の例で報告された TypeScript の ts(4023) エラーが発生しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I'm styling switch with styled-components in TypeScript like this:

import styled from "styled-components";
import Switch from "rc-switch";

export const StyledSwitch = styled(Switch)(({ checked, disabled }) => {
  position: "relative",
  borderRadius: "1rem",
  cursor: "pointer",
});

But I'm getting this error.

Exported variable 'StyledSwitch' has or is using name 'SwitchProps' from external module "/Users/claudvanbarret/project/node_modules/rc-switch/lib/index" but cannot be named.ts(4023)

This error can be probably is an issue in TypeScript, but wen can quickly solve this problem by exporting the SwitchProps interface.

I already send a pull request(https://github.com/react-component/switch/pull/56) to fix it.

主要言語
JavaScript
スター
196
フォーク
80
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

react-component/switch のほかの issue

react-component/switch の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。