Skip to content

Commit d4456b0

Browse files
committed
refactor
1 parent 9d2bd6f commit d4456b0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

dictionary/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ const compoundAdjectiveDefinition = checkedSequence(
434434
adjectives,
435435
}))
436436
.filterWithPositionedError(({ adjectives }) =>
437-
adjectives.every((adjective) => adjective.adverbs.length === 0) ||
437+
adjectives.every(({ adverbs: { length } }) => length === 0) ||
438438
throwError("compound adjective cannot have adverbs")
439439
);
440440
const verbDefinition = checkedSequence(

src/parser/filter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export const CONTEXT_CLAUSE_RULES: ReadonlyArray<
235235
(contextClause: ContextClause) => boolean
236236
> = [
237237
// only allow "anu la" when allowed by the settings
238-
(clause) => clause.type !== "anu" || settings.hardcodedAnuLa,
238+
({ type }) => type !== "anu" || settings.hardcodedAnuLa,
239239

240240
// disallow "anu ala anu la"
241241
(clause) =>

src/translator/phrase.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ export function multiplePhrases(
390390
type: "noun",
391391
noun: combineNoun(
392392
conjunction,
393-
phrase.map((phrase) => phrase.noun),
393+
phrase.map(({ noun }) => noun),
394394
),
395395
};
396396
} else if (phrase.every((phrase) => phrase.type === "adjective")) {
@@ -401,7 +401,7 @@ export function multiplePhrases(
401401
type: "adjective",
402402
adjective: combineAdjective(
403403
conjunction,
404-
phrase.map((phrase) => phrase.adjective),
404+
phrase.map(({ adjective }) => adjective),
405405
),
406406
inWayPhrase: null,
407407
};

0 commit comments

Comments
 (0)