MCPcopy Create free account
hub / github.com/effect-app/libs / isStringTree

Function isStringTree

repos/effect/packages/effect/src/SchemaAST.ts:3954–3974  ·  view source on GitHub ↗
(u: unknown)

Source from the content-addressed store, hash-verified

3952 SchemaGetter.transformOrFail((sym: symbol, options) => {
3953 const key = globalThis.Symbol.keyFor(sym)
3954 if (key !== undefined) {
3955 return Effect.succeed(globalThis.String(sym))
3956 }
3957 return Effect.fail(
3958 new SchemaIssue.Forbidden(
3959 { message: "cannot serialize to string, Symbol is not registered" },
3960 sym,
3961 options
3962 )
3963 )
3964 })
3965 )
3966)
3967
3968/** @internal */
3969export function isStringSymbol(annotations?: Schema.Annotations.Filter) {
3970 return isPattern(
3971 isStringSymbolRegExp,
3972 {
3973 expected: "a string representing a symbol",
3974 representation: {
3975 id: "effect/schema/isStringSymbol",
3976 payload: null
3977 },

Callers 1

SchemaAST.tsFile · 0.85

Calls 1

recurFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…