Add authentication and assets
This commit is contained in:
11
src/lang/Strings.ts
Normal file
11
src/lang/Strings.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export default class Strings {
|
||||
public static randomString(length: number): string {
|
||||
return Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 2 + length);
|
||||
}
|
||||
|
||||
private constructor() {
|
||||
throw new Error('Strings is a static class that may not be instantiated');
|
||||
}
|
||||
}
|
||||
3
src/lang/assertUnreachable.ts
Normal file
3
src/lang/assertUnreachable.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function assertUnreachable(x: never): never {
|
||||
throw new Error(`Error: Reached un-reachable code with [${x}]`);
|
||||
}
|
||||
Reference in New Issue
Block a user