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

Method expect

packages/effect/src/unstable/encoding/Yaml.ts:308–311  ·  view source on GitHub ↗
(character: string)

Source from the content-addressed store, hash-verified

306 }
307
308 private expect(character: string): void {
309 if (this.peek() !== character) this.fail(`Expected '${character}'`)
310 this.index++
311 }
312
313 private peek(): string {
314 return this.input[this.index] ?? ""

Callers 2

parseSequenceMethod · 0.95
parseMappingMethod · 0.95

Calls 2

peekMethod · 0.95
failMethod · 0.95

Tested by

no test coverage detected