File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,11 +70,11 @@ const WORD_TOKEN = {
7070 *
7171 * @returns An object with all required props set to no-op stubs.
7272 */
73- function requiredProps ( ) {
73+ function requiredProps ( ) : { token : Token & { type : 'word' } ; onFocus : ( ) => void } {
7474 return {
7575 token : WORD_TOKEN ,
7676 onFocus : jest . fn ( ) ,
77- } as const ;
77+ } ;
7878}
7979
8080const PUNCT_TOKEN = {
Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ type SegmentViewProps = Readonly<{
3131 * @param props.focusedTokenId - When set, the matching word token's `PhraseBox` is rendered in the
3232 * focused state; only meaningful in `token-chip` mode.
3333 * @param props.isActive - Whether this segment is the currently selected verse
34- * @param props.onSelect - Called when the segment or one of its word tokens is interacted with. In
35- * `baseline-text` mode the whole segment is clickable and `tokenId` is omitted. In `token-chip`
36- * mode only word tokens trigger this callback and `tokenId` is always provided; omit to render
37- * word tokens as non-interactive spans .
34+ * @param props.onSelect - Required callback invoked when the segment or one of its word tokens is
35+ * interacted with. In `baseline-text` mode the whole segment is clickable and `tokenId` is
36+ * omitted. In `token-chip` mode only word tokens trigger this callback and `tokenId` is always
37+ * provided .
3838 * @param props.segment - The segment to render
3939 * @returns A button (baseline-text mode) or div (token-chip mode) containing a verse label and
4040 * segment content
You can’t perform that action at this time.
0 commit comments