File tree 2 files changed +11
-10
lines changed
2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ export default function AutoNumericComponent({
46
46
autoNumericOptions,
47
47
state,
48
48
} : {
49
- element : string ;
50
- refKey : string ;
51
- props ?: Parameters < typeof createElement > [ 1 ] ;
52
- autoNumericOptions ?: CallbackOptions ;
53
- state ?: NonNullable < Parameters < typeof AutoNumeric . set > [ 1 ] > ;
49
+ element : Readonly < string > ;
50
+ refKey : Readonly < string > ;
51
+ props ?: Readonly < Parameters < typeof createElement > [ 1 ] > ;
52
+ autoNumericOptions ?: Readonly < CallbackOptions > ;
53
+ state ?: Readonly < NonNullable < Parameters < typeof AutoNumeric . set > [ 1 ] > > ;
54
54
} ) : JSX . Element {
55
55
const htmlElement = useRef < HTMLElement > ( null ) ;
56
56
const autoNumeric = useRef < AutoNumeric | null > ( null ) ;
@@ -78,7 +78,7 @@ export default function AutoNumericComponent({
78
78
htmlElement . current ,
79
79
autoNumericOptions ?? { } ,
80
80
) ;
81
- } , [ htmlElement . current , autoNumericOptions ] ) ;
81
+ } , [ htmlElement . current ] ) ;
82
82
83
83
if ( state !== undefined ) {
84
84
useEffect ( ( ) => {
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ export type InputProps = Omit<
33
33
* JSX!IntrinsicElements.input.props}.
34
34
* @param options.autoNumericOptions - Options passed to {@link !AutoNumeric}. Same as {@link
35
35
* AutoNumeric!Options}.
36
- * @param options.valueState - The state and state setter from the parent component.
36
+ * @param options.valueState - The state and state setter from the parent component to be passed
37
+ * into this component.
37
38
* @param options.valueState.state - The state from the parent component to be passed in.
38
39
* @param options.valueState.stateSetter - The callback function that sets
39
40
* `options.valueState.state`.
@@ -44,10 +45,10 @@ export function AutoNumericInput({
44
45
autoNumericOptions,
45
46
valueState,
46
47
} : {
47
- inputProps ?: InputProps ;
48
- autoNumericOptions ?: CallbackOptions ;
48
+ inputProps ?: Readonly < InputProps > ;
49
+ autoNumericOptions ?: Readonly < CallbackOptions > ;
49
50
valueState ?: {
50
- state : string ;
51
+ state : Readonly < string > ;
51
52
stateSetter : React . Dispatch < React . SetStateAction < string > > ;
52
53
} ;
53
54
} ) : JSX . Element {
You can’t perform that action at this time.
0 commit comments