From ab24bf7cf9260d49b71a39de4c8c31452a0de565 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:13:46 -0500 Subject: [PATCH] some touchups and expose getEnglishVerb --- package.json | 2 +- src/lib/phrase-building/english-vp-rendering.ts | 2 +- src/types.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3aca11b..c063d22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.0.0", + "version": "3.0.1", "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/english-vp-rendering.ts b/src/lib/phrase-building/english-vp-rendering.ts index 86cd067..a6d4469 100644 --- a/src/lib/phrase-building/english-vp-rendering.ts +++ b/src/lib/phrase-building/english-vp-rendering.ts @@ -252,5 +252,5 @@ export function renderEnglishVPBase({ subjectPerson, object, vs }: { : isImperativeTense(vs.tense) ? imperativeBuilders[vs.tense] : (vs.voice === "active" ? modalBuilders : passiveModalBuilders)[vs.tense])(subjectPerson, ec, vs.negative); - return base.map(b => `${b}${typeof object === "object" ? " $OBJ" : ""}${ep ? ` ${ep}` : ""}`); + return base.map(b => `${b}${typeof object === "object" ? " $OBJ" : ""}${ep ? ` ${ep}` : ""}`.replace(" ", " ").trim()); } diff --git a/src/types.ts b/src/types.ts index b4e71ef..4977785 100644 --- a/src/types.ts +++ b/src/types.ts @@ -573,7 +573,7 @@ export type VPSelectionComplete = { form: FormVersion, }; -export type VerbSelectionComplete = Omit & { +export type VerbSelectionComplete = Omit & { tense: VerbTense | PerfectTense | ModalTense | ImperativeTense, }