Doc lints

This commit is contained in:
Jorik Schellekens 2020-06-11 02:10:56 +01:00 committed by GitHub
parent 339ae06992
commit a4aeefa53c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,8 @@ import {
/* /*
* Verifiers are regexes which will match valid * Verifiers are regexes which will match valid
* identifiers to their type * identifiers to their type. (This is a lie, they
* can return anything)
*/ */
type Verifier<A> = [RegExp, A]; type Verifier<A> = [RegExp, A];
export const roomVerifiers: Verifier< export const roomVerifiers: Verifier<
@ -91,7 +92,7 @@ export function parsePermalink(identifier: string) {
/* /*
* descriminate applies the verifiers to the identifier and * descriminate applies the verifiers to the identifier and
* returns it's type * returns the identifier's type
*/ */
export function discriminate<T, F>( export function discriminate<T, F>(
identifier: string, identifier: string,
@ -143,9 +144,9 @@ export function parseArgs(args: string): Arguments {
} }
/* /*
* toURI converts a parsed link to uri. Typically it's recommended * toURI converts a Link to uri. It's recommended
* to show the original link if it existed but this is handy in the * to use the original link instead of toURI if it existed.
* case where this was constructed. * This is handy function in case the Link was constructed.
*/ */
export function toURI(hostname: string, link: SafeLink): string { export function toURI(hostname: string, link: SafeLink): string {
const cleanHostname = hostname.trim().replace(/\/+$/, ""); const cleanHostname = hostname.trim().replace(/\/+$/, "");