style(api): apply prettier formatting
This commit is contained in:
1 parent
80fef25af3
commit
96fede9fe5
75 files changed
+955
-674
No files matched your search
@@ -98,9 +98,7 @@ function validateMatchIdsLookupOptions(
|
||||
assertOptionalNonNegativeInteger(options.endTime, 'endTime');
|
||||
|
||||
if (options.type !== undefined && !RIOT_MATCH_TYPES.includes(options.type)) {
|
||||
throw new RangeError(
|
||||
`type must be one of: ${RIOT_MATCH_TYPES.join(', ')}`,
|
||||
);
|
||||
throw new RangeError(`type must be one of: ${RIOT_MATCH_TYPES.join(', ')}`);
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -278,7 +276,9 @@ function parseTimelineParticipant(
|
||||
index: number,
|
||||
): RiotMatchTimelineParticipantDto {
|
||||
if (!isRecord(value)) {
|
||||
throw new TypeError(`timeline.info.participants[${index}] must be an object.`);
|
||||
throw new TypeError(
|
||||
`timeline.info.participants[${index}] must be an object.`,
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -287,7 +287,10 @@ function parseTimelineParticipant(
|
||||
value.participantId,
|
||||
`timeline.info.participants[${index}].participantId`,
|
||||
),
|
||||
puuid: requireString(value.puuid, `timeline.info.participants[${index}].puuid`),
|
||||
puuid: requireString(
|
||||
value.puuid,
|
||||
`timeline.info.participants[${index}].puuid`,
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -589,7 +592,10 @@ function parseParticipant(
|
||||
};
|
||||
}
|
||||
|
||||
function parsePerks(value: unknown, participantIndex: number): RiotMatchPerksDto {
|
||||
function parsePerks(
|
||||
value: unknown,
|
||||
participantIndex: number,
|
||||
): RiotMatchPerksDto {
|
||||
if (!isRecord(value)) {
|
||||
throw new TypeError(
|
||||
`participants[${participantIndex}].perks must be an object.`,
|
||||
@@ -732,7 +738,9 @@ function parseBan(
|
||||
banIndex: number,
|
||||
): RiotMatchBanDto {
|
||||
if (!isRecord(value)) {
|
||||
throw new TypeError(`teams[${teamIndex}].bans[${banIndex}] must be an object.`);
|
||||
throw new TypeError(
|
||||
`teams[${teamIndex}].bans[${banIndex}] must be an object.`,
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -781,7 +789,9 @@ function parseObjective(
|
||||
key: keyof RiotMatchObjectivesDto,
|
||||
): RiotMatchObjectiveDto {
|
||||
if (!isRecord(value)) {
|
||||
throw new TypeError(`teams[${teamIndex}].objectives.${key} must be an object.`);
|
||||
throw new TypeError(
|
||||
`teams[${teamIndex}].objectives.${key} must be an object.`,
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user