From 2717b2a7b52bcced2ed70151a2892035419abb0b Mon Sep 17 00:00:00 2001 From: Lucas Alves Costa <50385918+luckasnix@users.noreply.github.com> Date: Tue, 2 Jul 2024 19:10:24 -0300 Subject: [PATCH] docs: add a description to the constructor (#20) --- docs/object-graph.md | 2 +- src/object-graph/index.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/object-graph.md b/docs/object-graph.md index 43f8ee7..9721da2 100644 --- a/docs/object-graph.md +++ b/docs/object-graph.md @@ -3,7 +3,7 @@ ## Constructor -Instantiates an object graph. +Returns an instance of ObjectGraph. ### Parameters diff --git a/src/object-graph/index.ts b/src/object-graph/index.ts index 2e334c4..5a09f2c 100644 --- a/src/object-graph/index.ts +++ b/src/object-graph/index.ts @@ -2,6 +2,9 @@ export class ObjectGraph> { private nodes: Map; private keyExtractor: (nodeValue: NodeValue) => string; + /** + * @description Returns an instance of ObjectGraph. + */ constructor(nodeValues: Array, keyExtractor: (nodeValue: NodeValue) => string) { if (!nodeValues) { throw new Error("Provide a value for the 'nodeValues' parameter");