with one click
typescript
TypeScript conventions and rules for Graph Explorer, including branded types, function style preferences, and type safety patterns.
Menu
TypeScript conventions and rules for Graph Explorer, including branded types, function style preferences, and type safety patterns.
Testing standards, patterns, and utilities for Graph Explorer including Vitest, DbState, renderHookWithState, test data factories, SPARQL test helpers, and backward compatibility testing for persisted data.
Git workflow conventions for Graph Explorer. Use when making commits, creating branches, or discussing version control practices.
Handle management of any GitHub related tasks, including creating or modifying issues, publishing a branch as a pull requests (or PRs), or creating or modifying sub-issues or child issues.
Database connector and explorer patterns for Gremlin, openCypher, and SPARQL, including the query template tag and escapeString usage.
Graph Explorer product overview including supported graph types, query languages, databases, key features, and high-level architecture.
React component patterns, hooks, naming conventions, and the query-language translation system for Graph Explorer.
| name | typescript |
| description | TypeScript conventions and rules for Graph Explorer, including branded types, function style preferences, and type safety patterns. |
typescript.autoClosingTagsfunction handleClick() {} over const handleClick = () => {}). Arrow functions within function scope are fine.ReturnType<typeof ...> when available (e.g., use AppStore instead of ReturnType<typeof getAppStore>)The project uses branded types from @/utils for type safety. These prevent accidental mixing of similar types at compile time.
| Type | Creator Function | Location |
|---|---|---|
VertexId | createVertexId() | @/core/entities/vertex |
VertexType | createVertexType() | @/core/entities/vertex |
EdgeId | createEdgeId() | @/core/entities/edge |
EdgeType | createEdgeType() | @/core/entities/edge |
EdgeConnectionId | createEdgeConnectionId() | @/core/StateProvider/edgeConnectionId |
ConfigurationId | createNewConfigurationId() | @/core/ConfigurationProvider/types |
RenderedVertexId | toRenderedVertexId() | @/core/StateProvider/renderedEntities |
RenderedEdgeId | toRenderedEdgeId() | @/core/StateProvider/renderedEntities |
IriNamespace | splitIri() | @/utils/rdf |
IriLocalValue | splitIri() | @/utils/rdf |
RdfPrefix | generatePrefix() | @/utils/rdf |
NormalizedIriNamespace | normalizeNamespace() | @/utils/rdf |
Always use the appropriate branded type instead of string when working with these identifiers.