add more type annotations

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-04-20 21:05:00 +01:00
parent 8398e83d33
commit 3b245ee678
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ import {ICompletion, ISelectionRange} from "./Autocompleter";
const ROOM_REGEX = /\B#\S*/g;
function score(query, space) {
function score(query: string, space: string) {
const index = space.indexOf(query);
if (index === -1) {
return Infinity;
@ -40,7 +40,7 @@ function score(query, space) {
}
}
function matcherObject(room, displayedAlias, matchName = "") {
function matcherObject(room: Room, displayedAlias: string, matchName = "") {
return {
room,
matchName,