Skip to content

Commit e2ae484

Browse files
committed
string splitter removed
1 parent e36f14b commit e2ae484

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/components/TypeAnimation/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ const TypeAnimation = forwardRef<
101101
const WrapperEl = wrapper;
102102

103103
const preRenderedChildren = preRenderFirstString
104-
? (sequence.find(el => typeof el === 'string') as string | undefined) ||
105-
''
104+
? ((sequence.find(el => typeof el === 'string') || '') as string)
106105
: null;
107106

108107
return (

src/typical.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { SequenceElement, StringSplitter } from './components/TypeAnimation/index.types';
1+
import type { SequenceElement } from './components/TypeAnimation/index.types';
22
import { Wrapper } from './components/TypeAnimation/index.types';
33

44
const OP_CODE_DELETION = 'DELETE';
@@ -98,7 +98,7 @@ function* editor(edits: ReadonlyArray<string>) {
9898
}
9999
}
100100

101-
function* writer(text: string, splitter: StringSplitter, startIndex = 0) {
101+
function* writer(text: string, startIndex = 0) {
102102
const splitText = [...text];
103103
const endIndex = splitText.length;
104104

@@ -107,7 +107,7 @@ function* writer(text: string, splitter: StringSplitter, startIndex = 0) {
107107
}
108108
}
109109

110-
function* deleter(text: string, splitter: StringSplitter, startIndex = 0) {
110+
function* deleter(text: string, startIndex = 0) {
111111
const splitText = [...text];
112112
let endIndex = splitText.length;
113113

0 commit comments

Comments
 (0)