MCPcopy Create free account
hub / github.com/arktypeio/arktype / declaresFunction

Function declaresFunction

ark/aot/flat.ts:2020–2021  ·  view source on GitHub ↗
({ id, init }: VariableDeclarator)

Source from the content-addressed store, hash-verified

2018}
2019
2020const declaresFunction = ({ id, init }: VariableDeclarator): boolean =>
2021 id.type === "Identifier" && !!init && isPlainFunction(init)
2022
2023// a function expression that neither names itself nor is async or a generator
2024const isPlainFunction = (

Callers 1

functionsDeclaredFunction · 0.85

Calls 1

isPlainFunctionFunction · 0.85

Tested by

no test coverage detected