joshsh commented on code in PR #2599:
URL: https://github.com/apache/tinkerpop/pull/2599#discussion_r1632159790


##########
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.ts:
##########
@@ -43,27 +42,32 @@ export class Graph {
   }
 }
 
-class Element {
+class Element<TLabel extends string = string, TId = any> {
   constructor(
-    readonly id: string,
-    readonly label: string,
+    readonly id: TId,
+    readonly label: TLabel,

Review Comment:
   I'm not sure I follow this, either, but I want to understand. What is the 
difference between string-literal and string? I think of both vertex labels and 
edge labels as simply being strings, or being of a special vertex-label or 
edge-label type which contains string.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to