From c6f962603956171ea116c186917e4ba9affac263 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Wed, 20 Apr 2022 22:38:28 +0500 Subject: [PATCH] fix bug with the negative imperative and staying imperfective --- package.json | 2 +- src/lib/phrase-building/render-vp.ts | 4 +++- src/types.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d5e9584..45e3daf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "2.1.4", + "version": "2.1.5", "author": "lingdocs.com", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "homepage": "https://verbs.lingdocs.com", diff --git a/src/lib/phrase-building/render-vp.ts b/src/lib/phrase-building/render-vp.ts index 409ec31..922ff1e 100644 --- a/src/lib/phrase-building/render-vp.ts +++ b/src/lib/phrase-building/render-vp.ts @@ -162,7 +162,9 @@ function getPsVerbConjugation(conj: T.VerbConjugation, vs: T.VerbSelectionComple // TODO: handle the imperative form here const f = getTenseVerbForm(conj, vs.tense, vs.voice, vs.negative); const block = getMatrixBlock(f, objectPerson, person); - const perfective = isPerfective(vs.tense); + const perfective = (vs.tense === "perfectiveImperative" && vs.negative) + ? false + : isPerfective(vs.tense); const verbForm = getVerbFromBlock(block, person); const hasBa = hasBaParticle(getLong(verbForm)[0]); if (perfective) { diff --git a/src/types.ts b/src/types.ts index 603d04e..aca9edc 100644 --- a/src/types.ts +++ b/src/types.ts @@ -543,7 +543,7 @@ export type VPSelectionComplete = { verb: VerbSelectionComplete, }; -export type VerbSelectionComplete = Omit & { +export type VerbSelectionComplete = Omit & { object: Exclude, tense: VerbTense | PerfectTense | ModalTense | ImperativeTense, }