Skip to content

Commit

Permalink
type error
Browse files Browse the repository at this point in the history
  • Loading branch information
adueck committed Dec 4, 2023
1 parent 17fd8a4 commit 5190cf2
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 22 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
34 changes: 19 additions & 15 deletions src/lib/src/protobuf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 5190cf2

Please sign in to comment.