improve types

This commit is contained in:
Michael Telatynski 2021-07-12 13:26:34 +01:00
parent 8139aeb073
commit 51f0f5718a
15 changed files with 196 additions and 186 deletions

View file

@ -21,7 +21,7 @@ export interface IDiff {
at?: number;
}
function firstDiff(a: string, b: string) {
function firstDiff(a: string, b: string): number {
const compareLen = Math.min(a.length, b.length);
for (let i = 0; i < compareLen; ++i) {
if (a[i] !== b[i]) {