fix code quality issues

This commit is contained in:
まっちゃとーにゅ 2024-01-31 06:18:54 +09:00
parent 9ffa56aa1b
commit b6f6c3ea18
No known key found for this signature in database
GPG key ID: 143DE582A97FE052
27 changed files with 63 additions and 64 deletions

View file

@ -9,9 +9,9 @@ import Channel, { type MiChannelService } from '../channel.js';
class AdminChannel extends Channel {
public readonly chName = 'admin';
public static shouldShare = true;
public static requireCredential = true as const;
public static kind = 'read:admin:stream';
public static readonly shouldShare = true;
public static readonly requireCredential = true as const;
public static readonly kind = 'read:admin:stream';
@bindThis
public async init(params: any) {

View file

@ -12,9 +12,9 @@ import Channel, { type MiChannelService } from '../channel.js';
class AntennaChannel extends Channel {
public readonly chName = 'antenna';
public static shouldShare = false;
public static requireCredential = true as const;
public static kind = 'read:account';
public static readonly shouldShare = false;
public static readonly requireCredential = true as const;
public static readonly kind = 'read:account';
private antennaId: string;
constructor(

View file

@ -12,8 +12,8 @@ import Channel, { type MiChannelService } from '../channel.js';
class ChannelChannel extends Channel {
public readonly chName = 'channel';
public static shouldShare = false;
public static requireCredential = false as const;
public static readonly shouldShare = false;
public static readonly requireCredential = false as const;
private channelId: string;
constructor(

View file

@ -9,9 +9,9 @@ import Channel, { type MiChannelService } from '../channel.js';
class DriveChannel extends Channel {
public readonly chName = 'drive';
public static shouldShare = true;
public static requireCredential = true as const;
public static kind = 'read:account';
public static readonly shouldShare = true;
public static readonly requireCredential = true as const;
public static readonly kind = 'read:account';
@bindThis
public async init(params: any) {

View file

@ -16,8 +16,8 @@ import Channel, { type MiChannelService } from '../channel.js';
class GlobalTimelineChannel extends Channel {
public readonly chName = 'globalTimeline';
public static shouldShare = false;
public static requireCredential = false as const;
public static readonly shouldShare = false;
public static readonly requireCredential = false as const;
private withRenotes: boolean;
private withFiles: boolean;

View file

@ -13,8 +13,8 @@ import Channel, { type MiChannelService } from '../channel.js';
class HashtagChannel extends Channel {
public readonly chName = 'hashtag';
public static shouldShare = false;
public static requireCredential = false as const;
public static readonly shouldShare = false;
public static readonly requireCredential = false as const;
private q: string[][];
constructor(

View file

@ -14,9 +14,9 @@ import Channel, { type MiChannelService } from '../channel.js';
class HomeTimelineChannel extends Channel {
public readonly chName = 'homeTimeline';
public static shouldShare = false;
public static requireCredential = true as const;
public static kind = 'read:account';
public static readonly shouldShare = false;
public static readonly requireCredential = true as const;
public static readonly kind = 'read:account';
private withRenotes: boolean;
private withFiles: boolean;

View file

@ -16,9 +16,9 @@ import Channel, { type MiChannelService } from '../channel.js';
class HybridTimelineChannel extends Channel {
public readonly chName = 'hybridTimeline';
public static shouldShare = false;
public static requireCredential = true as const;
public static kind = 'read:account';
public static readonly shouldShare = false;
public static readonly requireCredential = true as const;
public static readonly kind = 'read:account';
private withRenotes: boolean;
private withReplies: boolean;
private withFiles: boolean;

View file

@ -15,8 +15,8 @@ import Channel, { type MiChannelService } from '../channel.js';
class LocalTimelineChannel extends Channel {
public readonly chName = 'localTimeline';
public static shouldShare = false;
public static requireCredential = false as const;
public static readonly shouldShare = false;
public static readonly requireCredential = false as const;
private withRenotes: boolean;
private withReplies: boolean;
private withFiles: boolean;

View file

@ -11,9 +11,9 @@ import Channel, { type MiChannelService } from '../channel.js';
class MainChannel extends Channel {
public readonly chName = 'main';
public static shouldShare = true;
public static requireCredential = true as const;
public static kind = 'read:account';
public static readonly shouldShare = true;
public static readonly requireCredential = true as const;
public static readonly kind = 'read:account';
constructor(
private noteEntityService: NoteEntityService,

View file

@ -12,8 +12,8 @@ const ev = new Xev();
class QueueStatsChannel extends Channel {
public readonly chName = 'queueStats';
public static shouldShare = true;
public static requireCredential = false as const;
public static readonly shouldShare = true;
public static readonly requireCredential = false as const;
constructor(id: string, connection: Channel['connection']) {
super(id, connection);

View file

@ -13,8 +13,8 @@ import Channel, { type MiChannelService } from '../channel.js';
class ReversiGameChannel extends Channel {
public readonly chName = 'reversiGame';
public static shouldShare = false;
public static requireCredential = false as const;
public static readonly shouldShare = false;
public static readonly requireCredential = false as const;
private gameId: MiReversiGame['id'] | null = null;
constructor(

View file

@ -9,9 +9,9 @@ import Channel, { type MiChannelService } from '../channel.js';
class ReversiChannel extends Channel {
public readonly chName = 'reversi';
public static shouldShare = true;
public static requireCredential = true as const;
public static kind = 'read:account';
public static readonly shouldShare = true;
public static readonly requireCredential = true as const;
public static readonly kind = 'read:account';
@bindThis
public async init(params: any) {

View file

@ -14,8 +14,8 @@ import Channel, { type MiChannelService } from '../channel.js';
class RoleTimelineChannel extends Channel {
public readonly chName = 'roleTimeline';
public static shouldShare = false;
public static requireCredential = false as const;
public static readonly shouldShare = false;
public static readonly requireCredential = false as const;
private roleId: string;
constructor(

View file

@ -12,8 +12,8 @@ const ev = new Xev();
class ServerStatsChannel extends Channel {
public readonly chName = 'serverStats';
public static shouldShare = true;
public static requireCredential = false as const;
public static readonly shouldShare = true;
public static readonly requireCredential = false as const;
constructor(id: string, connection: Channel['connection']) {
super(id, connection);

View file

@ -15,8 +15,8 @@ import Channel, { type MiChannelService } from '../channel.js';
class UserListChannel extends Channel {
public readonly chName = 'userList';
public static shouldShare = false;
public static requireCredential = false as const;
public static readonly shouldShare = false;
public static readonly requireCredential = false as const;
private listId: string;
private membershipsMap: Record<string, Pick<MiUserListMembership, 'withReplies'> | undefined> = {};
private listUsersClock: NodeJS.Timeout;