Skip to content

Commit f132daf

Browse files
authored
feat: export more ts definition (#13)
1 parent 973400b commit f132daf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/examples/controlled.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import '../../assets/style.less';
22
import React from 'react';
3-
import Segmented, { SegmentedValue } from 'rc-segmented';
3+
import Segmented from 'rc-segmented';
4+
import type { SegmentedValue } from 'rc-segmented';
45

56
export default class Demo extends React.Component<
6-
{},
7+
unknown,
78
{ value: SegmentedValue }
89
> {
910
state = {

src/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import omit from 'rc-util/lib/omit';
77

88
export type SegmentedValue = string | number;
99

10-
type SegmentedRawOption = SegmentedValue;
10+
export type SegmentedRawOption = SegmentedValue;
1111

12-
interface SegmentedLabeledOption {
12+
export interface SegmentedLabeledOption {
1313
className?: string;
1414
disabled?: boolean;
1515
label: React.ReactNode;

0 commit comments

Comments
 (0)