strictNullChecks (#4666)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo
2019-04-13 01:43:22 +09:00
committed by GitHub
parent 4ee40c3345
commit 987168b863
214 changed files with 939 additions and 785 deletions

View File

@@ -6,7 +6,7 @@ import { UserList } from '../models/entities/user-list';
import { ReversiGame } from '../models/entities/games/reversi/game';
class Publisher {
private ev: Xev;
private ev: Xev | null = null;
constructor() {
// Redisがインストールされてないときはプロセス間通信を使う
@@ -15,7 +15,7 @@ class Publisher {
}
}
private publish = (channel: string, type: string, value?: any): void => {
private publish = (channel: string, type: string | null, value?: any): void => {
const message = type == null ? value : value == null ?
{ type: type, body: null } :
{ type: type, body: value };
@@ -23,7 +23,7 @@ class Publisher {
if (this.ev) {
this.ev.emit(channel, message);
} else {
redis.publish('misskey', JSON.stringify({
redis!.publish('misskey', JSON.stringify({
channel: channel,
message: message
}));