thelounge/server
Reto Brunner fd14b4a172 make getClientConfiguration type safe
TS type assertions need to be avoided.

The following trivial example demonstrates why

```
type Person = {
	name: string;
	isBad: boolean;
};

function makePerson(): Person {
	const p: Person = {name: 'whatever'} as Person
	p.isBad = false
	return p // theoretically we are now good, p is a Person
}
```

Should the type ever change though, TS will happily trot along

```
type Person = {
	name: string;
	isBad: boolean;
	omgHowCouldYou: number;
};

function makePerson(): Person {
	const p: Person = {name: 'whatever'} as Person
	p.isBad = true
	return p // p is *not* a Person, omgHowCouldYou is missing
}
```

But we pinky swore to the compiler that p is in fact a Person.
In other words, the types are now wrong and you will fail during
runtime.
2022-11-22 03:07:29 +01:00
..
command-line Merge branch 'installDocs' 2022-08-01 13:29:48 +02:00
models Use nick as a realname fallback 2022-08-28 11:21:54 +02:00
plugins Added client type checking to webpack (#4619) 2022-08-23 00:26:07 -07:00
types TypeScript and Vue 3 (#4559) 2022-06-18 17:25:21 -07:00
client.ts Potentially fix saving new networks (#4599) 2022-06-28 13:32:08 -07:00
clientManager.ts TypeScript and Vue 3 (#4559) 2022-06-18 17:25:21 -07:00
config.ts TypeScript and Vue 3 (#4559) 2022-06-18 17:25:21 -07:00
helper.ts TypeScript and Vue 3 (#4559) 2022-06-18 17:25:21 -07:00
identification.ts TypeScript and Vue 3 (#4559) 2022-06-18 17:25:21 -07:00
index.d.ts TypeScript and Vue 3 (#4559) 2022-06-18 17:25:21 -07:00
index.ts TypeScript and Vue 3 (#4559) 2022-06-18 17:25:21 -07:00
log.ts TypeScript and Vue 3 (#4559) 2022-06-18 17:25:21 -07:00
server.ts make getClientConfiguration type safe 2022-11-22 03:07:29 +01:00
tsconfig.json TypeScript and Vue 3 (#4559) 2022-06-18 17:25:21 -07:00