Skip to content

Commit

Permalink
fix: StrictArrayBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
ilteoood committed Dec 20, 2023
1 parent 0fa0ae3 commit 954e2ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"devDependencies": {
"@biomejs/biome": "1.4.1",
"@types/json-schema": "^7.0.15",
"seqproto": "^0.2.2",
"seqproto": "^0.2.3",
"tsup": "^8.0.1",
"typescript": "^5.3.3",
"vitest": "^1.0.4"
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

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

4 changes: 1 addition & 3 deletions src/serializer.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import type { JSONSchema4, JSONSchema4TypeName } from "json-schema";

import type { Ser } from "seqproto";
import type { Ser, StrictArrayBuffer } from "seqproto";

type SerializeFunction = (index: number, objectKey?: string) => string;

type SerializerCreator = (jsonSchema: JSONSchema4) => SerializeFunction;

type SerializeFunctionBuilder = (functionName: string) => SerializeFunction;

type StrictArrayBuffer = ReturnType<Ser["getBuffer"]>;

const indexedObject = (index: number) => `object_${Math.max(index, 0)}`;

const buildBaseSerializeFunction: SerializeFunctionBuilder =
Expand Down

0 comments on commit 954e2ea

Please sign in to comment.