Skip to content

Commit a904eae

Browse files
committed
readonly
1 parent bc8a906 commit a904eae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dictionary/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function template<T>(parser: Parser<T>): Parser<T> {
8181
const simpleUnit = memoize((kind: string) => word.skip(tag(keyword(kind))));
8282
function detectRepetition(
8383
source: ReadonlyArray<string>,
84-
): { before: string; repeat: string; after: string } {
84+
): Readonly<{ before: string; repeat: string; after: string }> {
8585
if (source.length === 1) {
8686
return { before: source[0], repeat: "", after: "" };
8787
}

src/parser/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function binaryWords(
197197
} else if (!contentWordSet.has(words[1])) {
198198
throw new UnrecognizedError(`"${words[1]}" as content word`);
199199
} else {
200-
return words as [string, string];
200+
return words as readonly [bottom: string, top: string];
201201
}
202202
});
203203
}

0 commit comments

Comments
 (0)