Skip to content

Commit 31e63af

Browse files
committed
chore: enable strict type checking
1 parent a327f55 commit 31e63af

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

docs/demo/refs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import '../../assets/style.less';
44

55
class ClassComponentWithStringRef extends React.Component {
6-
refs: {
6+
refs!: {
77
segmentedRef: HTMLDivElement;
88
};
99

src/MotionThumb.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type ThumbReact = {
1414
} | null;
1515

1616
export interface MotionThumbInterface {
17-
containerRef: React.RefObject<HTMLDivElement>;
17+
containerRef: React.RefObject<HTMLDivElement | null>;
1818
value: SegmentedValue;
1919
getValueIndex: (value: SegmentedValue) => number;
2020
prefixCls: string;

tsconfig.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"moduleResolution": "bundler",
66
"lib": ["dom", "es2017"],
77
"jsx": "react",
8-
"strict": false,
8+
"strict": true,
99
"esModuleInterop": true,
1010
"experimentalDecorators": true,
1111
"emitDecoratorMetadata": true,
@@ -18,13 +18,7 @@
1818
"@rc-component/segmented/es": ["./src"],
1919
"@rc-component/segmented/es/*": ["./src/*"],
2020
"@rc-component/segmented/assets/*": ["./assets/*"]
21-
},
22-
"noImplicitAny": false,
23-
"strictNullChecks": false,
24-
"strictPropertyInitialization": false,
25-
"strictFunctionTypes": false,
26-
"noImplicitThis": false,
27-
"strictBindCallApply": false
21+
}
2822
},
2923
"include": [
3024
"global.d.ts",

0 commit comments

Comments
 (0)