MCPcopy Create free account
hub / github.com/Effect-TS/effect / expect

Function expect

packages/effect/src/internal/schema/codeExpression.ts:20–22  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

18 const at = (text: string): boolean => tokens[index]?.text === text
19 const take = (text: string): boolean => at(text) ? (index++, true) : false
20 const expect = (text: string): void => {
21 if (!take(text)) fail()
22 }
23 const identifier = (): Token => {
24 const token = tokens[index]
25 if (token?.kind !== "identifier") return fail()

Callers 3

listFunction · 0.70
typeMemberFunction · 0.70
expressionFunction · 0.70

Calls 2

takeFunction · 0.70
failFunction · 0.70

Tested by

no test coverage detected