MCPcopy
hub / github.com/flightcontrolhq/superjson / simpleTransformation

Function simpleTransformation

src/transformer.ts:39–51  ·  view source on GitHub ↗
(
  isApplicable: (v: any, superJson: SuperJSON) => v is I,
  annotation: A,
  transform: (v: I, superJson: SuperJSON) => O,
  untransform: (v: O, superJson: SuperJSON) => I
)

Source from the content-addressed store, hash-verified

37export type TypeAnnotation = SimpleTypeAnnotation | CompositeTypeAnnotation;
38
39function simpleTransformation<I, O, A extends SimpleTypeAnnotation>(
40 isApplicable: (v: any, superJson: SuperJSON) => v is I,
41 annotation: A,
42 transform: (v: I, superJson: SuperJSON) => O,
43 untransform: (v: O, superJson: SuperJSON) => I
44) {
45 return {
46 isApplicable,
47 annotation,
48 transform,
49 untransform,
50 };
51}
52
53const simpleRules = [
54 simpleTransformation(

Callers 1

transformer.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…