Skip to content

Commit b28d943

Browse files
committed
fix: deprecated ref types in native spec files
1 parent 53c6165 commit b28d943

1 file changed

Lines changed: 27 additions & 28 deletions

File tree

src/spec/EnrichedTextInputNativeComponent.ts

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type {
55
HostComponent,
66
ViewProps,
77
} from 'react-native';
8-
import { type ComponentRef } from 'react';
98

109
export interface LinkNativeRegex {
1110
pattern: string;
@@ -415,69 +414,69 @@ type ComponentType = HostComponent<NativeProps>;
415414

416415
interface NativeCommands {
417416
// General commands
418-
focus: (viewRef: ComponentRef<ComponentType>) => void;
419-
blur: (viewRef: ComponentRef<ComponentType>) => void;
420-
setValue: (viewRef: ComponentRef<ComponentType>, text: string) => void;
417+
focus: (viewRef: React.ComponentRef<ComponentType>) => void;
418+
blur: (viewRef: React.ComponentRef<ComponentType>) => void;
419+
setValue: (viewRef: React.ComponentRef<ComponentType>, text: string) => void;
421420
setSelection: (
422-
viewRef: ComponentRef<ComponentType>,
421+
viewRef: React.ComponentRef<ComponentType>,
423422
start: CodegenTypes.Int32,
424423
end: CodegenTypes.Int32
425424
) => void;
426425

427426
// Text formatting commands
428-
toggleBold: (viewRef: ComponentRef<ComponentType>) => void;
429-
toggleItalic: (viewRef: ComponentRef<ComponentType>) => void;
430-
toggleUnderline: (viewRef: ComponentRef<ComponentType>) => void;
431-
toggleStrikeThrough: (viewRef: ComponentRef<ComponentType>) => void;
432-
toggleInlineCode: (viewRef: ComponentRef<ComponentType>) => void;
433-
toggleH1: (viewRef: ComponentRef<ComponentType>) => void;
434-
toggleH2: (viewRef: ComponentRef<ComponentType>) => void;
435-
toggleH3: (viewRef: ComponentRef<ComponentType>) => void;
436-
toggleH4: (viewRef: ComponentRef<ComponentType>) => void;
437-
toggleH5: (viewRef: ComponentRef<ComponentType>) => void;
438-
toggleH6: (viewRef: ComponentRef<ComponentType>) => void;
439-
toggleCodeBlock: (viewRef: ComponentRef<ComponentType>) => void;
440-
toggleBlockQuote: (viewRef: ComponentRef<ComponentType>) => void;
441-
toggleOrderedList: (viewRef: ComponentRef<ComponentType>) => void;
442-
toggleUnorderedList: (viewRef: ComponentRef<ComponentType>) => void;
427+
toggleBold: (viewRef: React.ComponentRef<ComponentType>) => void;
428+
toggleItalic: (viewRef: React.ComponentRef<ComponentType>) => void;
429+
toggleUnderline: (viewRef: React.ComponentRef<ComponentType>) => void;
430+
toggleStrikeThrough: (viewRef: React.ComponentRef<ComponentType>) => void;
431+
toggleInlineCode: (viewRef: React.ComponentRef<ComponentType>) => void;
432+
toggleH1: (viewRef: React.ComponentRef<ComponentType>) => void;
433+
toggleH2: (viewRef: React.ComponentRef<ComponentType>) => void;
434+
toggleH3: (viewRef: React.ComponentRef<ComponentType>) => void;
435+
toggleH4: (viewRef: React.ComponentRef<ComponentType>) => void;
436+
toggleH5: (viewRef: React.ComponentRef<ComponentType>) => void;
437+
toggleH6: (viewRef: React.ComponentRef<ComponentType>) => void;
438+
toggleCodeBlock: (viewRef: React.ComponentRef<ComponentType>) => void;
439+
toggleBlockQuote: (viewRef: React.ComponentRef<ComponentType>) => void;
440+
toggleOrderedList: (viewRef: React.ComponentRef<ComponentType>) => void;
441+
toggleUnorderedList: (viewRef: React.ComponentRef<ComponentType>) => void;
443442
toggleCheckboxList: (
444-
viewRef: ComponentRef<ComponentType>,
443+
viewRef: React.ComponentRef<ComponentType>,
445444
checked: boolean
446445
) => void;
447446
addLink: (
448-
viewRef: ComponentRef<ComponentType>,
447+
viewRef: React.ComponentRef<ComponentType>,
449448
start: CodegenTypes.Int32,
450449
end: CodegenTypes.Int32,
451450
text: string,
452451
url: string
453452
) => void;
454453
removeLink: (
455-
viewRef: ComponentRef<ComponentType>,
454+
viewRef: React.ComponentRef<ComponentType>,
456455
start: CodegenTypes.Int32,
457456
end: CodegenTypes.Int32
458457
) => void;
459458
addImage: (
460-
viewRef: ComponentRef<ComponentType>,
459+
viewRef: React.ComponentRef<ComponentType>,
461460
uri: string,
462461
width: CodegenTypes.Float,
463462
height: CodegenTypes.Float
464463
) => void;
465464
startMention: (
466-
viewRef: ComponentRef<ComponentType>,
465+
viewRef: React.ComponentRef<ComponentType>,
467466
indicator: string
468467
) => void;
469468
addMention: (
470-
viewRef: ComponentRef<ComponentType>,
469+
viewRef: React.ComponentRef<ComponentType>,
471470
indicator: string,
472471
text: string,
473472
payload: string
474473
) => void;
475474
requestHTML: (
476-
viewRef: ComponentRef<ComponentType>,
475+
viewRef: React.ComponentRef<ComponentType>,
477476
requestId: CodegenTypes.Int32
478477
) => void;
479478
setTextAlignment: (
480-
viewRef: ComponentRef<ComponentType>,
479+
viewRef: React.ComponentRef<ComponentType>,
481480
alignment: string
482481
) => void;
483482
}

0 commit comments

Comments
 (0)