Skip to content

Commit 7bd8254

Browse files
azuclaude
andcommitted
fix: accept readonly array in concatJoishiTokens function
Fixed TypeScript compilation error where concatJoishiTokens was expecting a mutable array but received a readonly array from the tokenize function. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 958a006 commit 7bd8254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/token-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const concatToken = (aToken: KuromojiToken, bToken: KuromojiToken) => {
4848
* @param {Array} tokens
4949
* @returns {Array}
5050
*/
51-
export const concatJoishiTokens = (tokens: KuromojiToken[]) => {
51+
export const concatJoishiTokens = (tokens: readonly KuromojiToken[]) => {
5252
const newTokens: KuromojiToken[] = [];
5353
tokens.forEach((token) => {
5454
const prevToken = newTokens[newTokens.length - 1];

0 commit comments

Comments
 (0)