parent
							
								
									3a035c481e
								
							
						
					
					
						commit
						68ee9a008e
					
				
					 10 changed files with 20 additions and 20 deletions
				
			
		|  | @ -21,7 +21,7 @@ export type Partial<T> = { | |||
| }; | ||||
| 
 | ||||
| type ArrayValue<T> = { | ||||
| 	[P in keyof T]: T[P] extends number ? Array<T[P]> : ArrayValue<T[P]>; | ||||
| 	[P in keyof T]: T[P] extends number ? T[P][] : ArrayValue<T[P]>; | ||||
| }; | ||||
| 
 | ||||
| type Span = 'day' | 'hour'; | ||||
|  |  | |||
|  | @ -27,11 +27,11 @@ export interface IReversiGame { | |||
| 	isEnded: boolean; | ||||
| 	winnerId: mongo.ObjectID; | ||||
| 	surrendered: mongo.ObjectID; | ||||
| 	logs: Array<{ | ||||
| 	logs: { | ||||
| 		at: Date; | ||||
| 		color: boolean; | ||||
| 		pos: number; | ||||
| 	}>; | ||||
| 	}[]; | ||||
| 	settings: { | ||||
| 		map: string[]; | ||||
| 		bw: string | number; | ||||
|  |  | |||
|  | @ -52,11 +52,11 @@ export type INote = { | |||
| 	repliesCount: number; | ||||
| 	reactionCounts: any; | ||||
| 	mentions: mongo.ObjectID[]; | ||||
| 	mentionedRemoteUsers: Array<{ | ||||
| 	mentionedRemoteUsers: { | ||||
| 		uri: string; | ||||
| 		username: string; | ||||
| 		host: string; | ||||
| 	}>; | ||||
| 	}[]; | ||||
| 
 | ||||
| 	/** | ||||
| 	 * public ... 公開 | ||||
|  |  | |||
|  | @ -29,22 +29,22 @@ export default define(meta, (ps) => new Promise(async (res, rej) => { | |||
| 		$group: { | ||||
| 			_id: { tag: '$tagsLower', userId: '$userId' } | ||||
| 		} | ||||
| 	}]) as Array<{ | ||||
| 	}]) as { | ||||
| 		_id: { | ||||
| 			tag: string; | ||||
| 			userId: any; | ||||
| 		} | ||||
| 	}>; | ||||
| 	}[]; | ||||
| 	//#endregion
 | ||||
| 
 | ||||
| 	if (data.length == 0) { | ||||
| 		return res([]); | ||||
| 	} | ||||
| 
 | ||||
| 	let tags: Array<{ | ||||
| 	let tags: { | ||||
| 		name: string; | ||||
| 		count: number; | ||||
| 	}> = []; | ||||
| 	}[] = []; | ||||
| 
 | ||||
| 	// カウント
 | ||||
| 	for (const x of data.map(x => x._id).filter(x => !hidedTags.includes(x.tag))) { | ||||
|  |  | |||
|  | @ -40,22 +40,22 @@ export default define(meta, () => new Promise(async (res, rej) => { | |||
| 		$group: { | ||||
| 			_id: { tag: '$tagsLower', userId: '$userId' } | ||||
| 		} | ||||
| 	}]) as Array<{ | ||||
| 	}]) as { | ||||
| 		_id: { | ||||
| 			tag: string; | ||||
| 			userId: any; | ||||
| 		} | ||||
| 	}>; | ||||
| 	}[]; | ||||
| 	//#endregion
 | ||||
| 
 | ||||
| 	if (data.length == 0) { | ||||
| 		return res([]); | ||||
| 	} | ||||
| 
 | ||||
| 	const tags: Array<{ | ||||
| 	const tags: { | ||||
| 		name: string; | ||||
| 		count: number; | ||||
| 	}> = []; | ||||
| 	}[] = []; | ||||
| 
 | ||||
| 	// カウント
 | ||||
| 	for (const x of data.map(x => x._id).filter(x => !hidedTags.includes(x.tag))) { | ||||
|  | @ -108,7 +108,7 @@ export default define(meta, () => new Promise(async (res, rej) => { | |||
| 	//#endregion
 | ||||
| 
 | ||||
| 	//#region 2(または3)で話題と判定されたタグそれぞれについて過去の投稿数グラフを取得する
 | ||||
| 	const countPromises: Array<Promise<any[]>> = []; | ||||
| 	const countPromises: Promise<any[]>[] = []; | ||||
| 
 | ||||
| 	const range = 20; | ||||
| 
 | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ export default class extends Channel { | |||
| 		const mute = this.user ? await Mute.find({ muterId: this.user._id }) : null; | ||||
| 		const mutedUserIds = mute ? mute.map(m => m.muteeId.toString()) : []; | ||||
| 
 | ||||
| 		const q: Array<string[]> = params.q; | ||||
| 		const q: string[][] = params.q; | ||||
| 
 | ||||
| 		if (q == null) return; | ||||
| 
 | ||||
|  |  | |||
|  | @ -121,7 +121,7 @@ const parsePropDefinition = (key: string, prop: any) => { | |||
| 	return prop; | ||||
| }; | ||||
| 
 | ||||
| const sortParams = (params: Array<{ name: string }>) => { | ||||
| const sortParams = (params: { name: string }[]) => { | ||||
| 	return params; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -429,7 +429,7 @@ export default async function( | |||
| 
 | ||||
| 	const properties: {[key: string]: any} = {}; | ||||
| 
 | ||||
| 	let propPromises: Array<Promise<void>> = []; | ||||
| 	let propPromises: Promise<void>[] = []; | ||||
| 
 | ||||
| 	const isImage = ['image/jpeg', 'image/gif', 'image/png', 'image/webp'].includes(mime); | ||||
| 
 | ||||
|  |  | |||
|  | @ -38,10 +38,10 @@ type NotificationType = 'reply' | 'renote' | 'quote' | 'mention'; | |||
| class NotificationManager { | ||||
| 	private notifier: IUser; | ||||
| 	private note: INote; | ||||
| 	private queue: Array<{ | ||||
| 	private queue: { | ||||
| 		target: ILocalUser['_id']; | ||||
| 		reason: NotificationType; | ||||
| 	}>; | ||||
| 	}[]; | ||||
| 
 | ||||
| 	constructor(notifier: IUser, note: INote) { | ||||
| 		this.notifier = notifier; | ||||
|  |  | |||
|  | @ -18,7 +18,7 @@ | |||
| 		"no-empty":false, | ||||
| 		"ordered-imports": [false], | ||||
| 		"arrow-parens": false, | ||||
| 		"array-type": false, | ||||
| 		"array-type": [true, "array"], | ||||
| 		"object-literal-shorthand": false, | ||||
| 		"object-literal-key-quotes": false, | ||||
| 		"triple-equals": [false], | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue