Skip to content

Commit

Permalink
fix: export getDependencies method
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-pousette committed May 19, 2024
1 parent 1376b35 commit 6344e08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dao-xyz/borsh",
"version": "5.2.2",
"version": "5.2.3",
"readme": "README.md",
"homepage": "https://github.com/dao-xyz/borsh-ts#README",
"description": "Binary Object Representation Serializer for Hashing simplified with decorators",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,13 +587,13 @@ const checkClazzesCompatible = (clazzA: Constructor<any> | AbstractType<any>, cl
return clazzA == clazzB || clazzA.isPrototypeOf(clazzB) || clazzB.isPrototypeOf(clazzA)
}

const getDependencies = (ctor: Function, offset: number): Function[] | undefined => ctor.prototype[PROTOTYPE_DEPENDENCY_HANDLER_OFFSET + offset]
export const getDependencies = (ctor: Function, offset: number): Function[] | undefined => ctor.prototype[PROTOTYPE_DEPENDENCY_HANDLER_OFFSET + offset]

const setDependencies = (ctor: Function, offset: number, dependencies: Function[]) => {
ctor.prototype[PROTOTYPE_DEPENDENCY_HANDLER_OFFSET + offset] = dependencies // [getDependencyKey(ctor)]
}

const getAllDependencies = (ctor: Function, offset: number): Map<Function, { schema: StructKind, offset: number }> | undefined => {
export const getAllDependencies = (ctor: Function, offset: number): Map<Function, { schema: StructKind, offset: number }> | undefined => {
let existing = getDependencies(ctor, offset);
if (existing) {
let ret: Map<Function, { schema: StructKind, offset: number }> = new Map()
Expand Down

0 comments on commit 6344e08

Please sign in to comment.