type error
This commit is contained in:
parent
17fd8a4d05
commit
5190cf2adb
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "pashto-inflector",
|
"name": "pashto-inflector",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pashto-inflector",
|
"name": "pashto-inflector",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "pashto-inflector",
|
"name": "pashto-inflector",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"author": "lingdocs.com",
|
"author": "lingdocs.com",
|
||||||
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
||||||
"homepage": "https://verbs.lingdocs.com",
|
"homepage": "https://verbs.lingdocs.com",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/ps-react",
|
"name": "@lingdocs/ps-react",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lingdocs/ps-react",
|
"name": "@lingdocs/ps-react",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@formkit/auto-animate": "^1.0.0-beta.3",
|
"@formkit/auto-animate": "^1.0.0-beta.3",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/ps-react",
|
"name": "@lingdocs/ps-react",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"description": "Pashto inflector library module with React components",
|
"description": "Pashto inflector library module with React components",
|
||||||
"main": "dist/components/library.js",
|
"main": "dist/components/library.js",
|
||||||
"module": "dist/components/library.js",
|
"module": "dist/components/library.js",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/inflect",
|
"name": "@lingdocs/inflect",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"description": "Pashto inflector library",
|
"description": "Pashto inflector library",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/lib/library.d.ts",
|
"types": "dist/lib/library.d.ts",
|
||||||
|
|
|
@ -4,27 +4,31 @@ import { Dictionary, DictionaryInfo } from "./dictionary-models";
|
||||||
import Pbf from "pbf";
|
import Pbf from "pbf";
|
||||||
|
|
||||||
export function writeDictionary(dictionary: T.Dictionary): ArrayBuffer {
|
export function writeDictionary(dictionary: T.Dictionary): ArrayBuffer {
|
||||||
const pbfDict = new Pbf();
|
const pbfDict = new Pbf();
|
||||||
Dictionary.write(dictionary, pbfDict);
|
// @ts-ignore
|
||||||
const buffer = pbfDict.finish();
|
Dictionary.write(dictionary, pbfDict);
|
||||||
return buffer;
|
const buffer = pbfDict.finish();
|
||||||
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function readDictionary(buffer: Uint8Array): T.Dictionary {
|
export function readDictionary(buffer: Uint8Array): T.Dictionary {
|
||||||
const pbf = new Pbf(buffer);
|
const pbf = new Pbf(buffer);
|
||||||
const dictionary = Dictionary.read(pbf) as T.Dictionary;
|
// @ts-ignore
|
||||||
return dictionary;
|
const dictionary = Dictionary.read(pbf) as T.Dictionary;
|
||||||
|
return dictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function writeDictionaryInfo(dictionary: T.DictionaryInfo): ArrayBuffer {
|
export function writeDictionaryInfo(dictionary: T.DictionaryInfo): ArrayBuffer {
|
||||||
const pbfDict = new Pbf();
|
const pbfDict = new Pbf();
|
||||||
DictionaryInfo.write(dictionary, pbfDict);
|
// @ts-ignore
|
||||||
const buffer = pbfDict.finish();
|
DictionaryInfo.write(dictionary, pbfDict);
|
||||||
return buffer;
|
const buffer = pbfDict.finish();
|
||||||
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function readDictionaryInfo(buffer: Uint8Array): T.DictionaryInfo {
|
export function readDictionaryInfo(buffer: Uint8Array): T.DictionaryInfo {
|
||||||
const pbf = new Pbf(buffer);
|
const pbf = new Pbf(buffer);
|
||||||
const dictionaryInfo = DictionaryInfo.read(pbf) as T.DictionaryInfo;
|
// @ts-ignore
|
||||||
return dictionaryInfo;
|
const dictionaryInfo = DictionaryInfo.read(pbf) as T.DictionaryInfo;
|
||||||
}
|
return dictionaryInfo;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue