From aa5296258cb3fc5535654c4c95d352cba6afa51d Mon Sep 17 00:00:00 2001 From: adueck Date: Fri, 3 Feb 2023 15:12:38 +0500 Subject: [PATCH] fix up types for InlinePs --- package-lock.json | 4 ++-- package.json | 2 +- src/components/package.json | 2 +- src/components/src/InlinePs.tsx | 10 +++++++--- src/lib/package.json | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3843716..1777afd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pashto-inflector", - "version": "5.7.12", + "version": "5.7.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "pashto-inflector", - "version": "5.7.12", + "version": "5.7.13", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index be1966f..25687c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pashto-inflector", - "version": "5.7.12", + "version": "5.7.13", "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/components/package.json b/src/components/package.json index ca0fd48..7de0aa2 100644 --- a/src/components/package.json +++ b/src/components/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/ps-react", - "version": "5.7.12", + "version": "5.7.13", "description": "Pashto inflector library module with React components", "main": "dist/components/library.js", "module": "dist/components/library.js", diff --git a/src/components/src/InlinePs.tsx b/src/components/src/InlinePs.tsx index cb58d41..df9ccab 100644 --- a/src/components/src/InlinePs.tsx +++ b/src/components/src/InlinePs.tsx @@ -14,12 +14,16 @@ function InlinePs ({ children, ps, opts, -}: { +}: ({ + ps: T.PsString | (T.PsJSX & { e?: string }), + children?: T.PsString | (T.PsJSX & { e?: string }), + opts: T.TextOptions, +} | { ps?: T.PsString | (T.PsJSX & { e?: string }), children: T.PsString | (T.PsJSX & { e?: string }), opts: T.TextOptions, -}) { - const text = children || ps; +})) { + const text = children || ps as T.PsString | (T.PsJSX & { e?: string }); return ( {text} diff --git a/src/lib/package.json b/src/lib/package.json index 22a5c7f..a109f31 100644 --- a/src/lib/package.json +++ b/src/lib/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/inflect", - "version": "5.7.12", + "version": "5.7.13", "description": "Pashto inflector library", "main": "dist/index.js", "types": "dist/lib/library.d.ts",