MCPcopy Create free account
hub / github.com/aiscript-dev/aiscript / unWrapRet

Function unWrapRet

src/interpreter/control.ts:53–62  ·  view source on GitHub ↗
(v: Value | Control)

Source from the content-addressed store, hash-verified

51}
52
53export function unWrapRet(v: Value | Control): Value {
54 switch (v.type) {
55 case 'return':
56 return v.value;
57 default: {
58 assertValue(v);
59 return v;
60 }
61 }
62}
63
64export function assertValue(v: Value | Control): asserts v is Value {
65 switch (v.type) {

Callers 2

_fnMethod · 0.85
_fnSyncMethod · 0.85

Calls 1

assertValueFunction · 0.85

Tested by

no test coverage detected