MCPcopy Create free account
hub / github.com/codemix/graph / makeType

Function makeType

packages/graph/src/test/EdgeTraversal.test.ts:9–19  ·  view source on GitHub ↗
(_defaultValue: T)

Source from the content-addressed store, hash-verified

7import type { GraphSchema } from "../GraphSchema.js";
8
9function makeType<T>(_defaultValue: T): StandardSchemaV1<T> {
10 return {
11 "~standard": {
12 version: 1,
13 vendor: "codemix",
14 validate: (value) => {
15 return { value: value as T };
16 },
17 },
18 };
19}
20
21const weightedEdgeSchema = {
22 vertices: {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected