MCPcopy
hub / github.com/Effect-TS/effect / getMatcher

Function getMatcher

packages/effect/src/Pretty.ts:37–41  ·  view source on GitHub ↗
(defaultPretty: Pretty<any>)

Source from the content-addressed store, hash-verified

35const getPrettyAnnotation = AST.getAnnotation<PrettyAnnotation<any, any>>(AST.PrettyAnnotationId)
36
37const getMatcher = (defaultPretty: Pretty<any>) => (ast: AST.AST): Pretty<any> =>
38 Option.match(getPrettyAnnotation(ast), {
39 onNone: () => defaultPretty,
40 onSome: (handler) => handler()
41 })
42
43const toString = getMatcher((a) => String(a))
44

Callers 1

Pretty.tsFile · 0.85

Calls 1

handlerFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…