mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 00:45:04 +01:00
more eslint rules and fix bugs
This commit is contained in:
parent
12fcc4f1bb
commit
854112da3c
13 changed files with 67 additions and 29 deletions
|
|
@ -3,7 +3,7 @@ export function encodeUtf8(s: string): Uint8Array {
|
|||
}
|
||||
|
||||
export class Ids {
|
||||
nextId: number = 0;
|
||||
nextId = 0;
|
||||
|
||||
public next(): number {
|
||||
return this.nextId++;
|
||||
|
|
@ -22,13 +22,13 @@ export function unwrap<T>(value: T | undefined): T {
|
|||
* It uses JSON+string equality instead of refernece equality.
|
||||
*/
|
||||
export class ComplexMap<K, V> {
|
||||
inner: Map<string | number, V> = new Map();
|
||||
inner = new Map<string | number, V>();
|
||||
|
||||
public get(key: K): V | undefined {
|
||||
return this.inner.get(this.mangleKey(key));
|
||||
}
|
||||
|
||||
public set(key: K, value: V) {
|
||||
public set(key: K, value: V): void {
|
||||
this.inner.set(this.mangleKey(key), value);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue