type error

This commit is contained in:
adueck 2023-12-04 14:11:23 +04:00
parent 17fd8a4d05
commit 5190cf2adb
6 changed files with 26 additions and 22 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "pashto-inflector",
"version": "7.0.0",
"version": "7.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "pashto-inflector",
"version": "7.0.0",
"version": "7.0.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "pashto-inflector",
"version": "7.0.0",
"version": "7.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",

View File

@ -1,12 +1,12 @@
{
"name": "@lingdocs/ps-react",
"version": "7.0.0",
"version": "7.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@lingdocs/ps-react",
"version": "7.0.0",
"version": "7.0.1",
"license": "MIT",
"dependencies": {
"@formkit/auto-animate": "^1.0.0-beta.3",

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/ps-react",
"version": "7.0.0",
"version": "7.0.1",
"description": "Pashto inflector library module with React components",
"main": "dist/components/library.js",
"module": "dist/components/library.js",

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/inflect",
"version": "7.0.0",
"version": "7.0.1",
"description": "Pashto inflector library",
"main": "dist/index.js",
"types": "dist/lib/library.d.ts",

View File

@ -4,27 +4,31 @@ import { Dictionary, DictionaryInfo } from "./dictionary-models";
import Pbf from "pbf";
export function writeDictionary(dictionary: T.Dictionary): ArrayBuffer {
const pbfDict = new Pbf();
Dictionary.write(dictionary, pbfDict);
const buffer = pbfDict.finish();
return buffer;
const pbfDict = new Pbf();
// @ts-ignore
Dictionary.write(dictionary, pbfDict);
const buffer = pbfDict.finish();
return buffer;
}
export function readDictionary(buffer: Uint8Array): T.Dictionary {
const pbf = new Pbf(buffer);
const dictionary = Dictionary.read(pbf) as T.Dictionary;
return dictionary;
const pbf = new Pbf(buffer);
// @ts-ignore
const dictionary = Dictionary.read(pbf) as T.Dictionary;
return dictionary;
}
export function writeDictionaryInfo(dictionary: T.DictionaryInfo): ArrayBuffer {
const pbfDict = new Pbf();
DictionaryInfo.write(dictionary, pbfDict);
const buffer = pbfDict.finish();
return buffer;
const pbfDict = new Pbf();
// @ts-ignore
DictionaryInfo.write(dictionary, pbfDict);
const buffer = pbfDict.finish();
return buffer;
}
export function readDictionaryInfo(buffer: Uint8Array): T.DictionaryInfo {
const pbf = new Pbf(buffer);
const dictionaryInfo = DictionaryInfo.read(pbf) as T.DictionaryInfo;
return dictionaryInfo;
}
const pbf = new Pbf(buffer);
// @ts-ignore
const dictionaryInfo = DictionaryInfo.read(pbf) as T.DictionaryInfo;
return dictionaryInfo;
}