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

Function getConstructorDeclarationSignature

packages/tools/docgen/src/Parser.ts:558–570  ·  view source on GitHub ↗
(
  c: ast.ConstructorDeclaration
)

Source from the content-addressed store, hash-verified

556 * @internal
557 */
558export const getConstructorDeclarationSignature = (
559 c: ast.ConstructorDeclaration
560): string =>
561 pipe(
562 Option.fromNullishOr(c.compilerNode.body),
563 Option.match({
564 onNone: () => c.getText(),
565 onSome: (body) => {
566 const end = body.getStart() - c.getStart() - 1
567 return c.getText().substring(0, end)
568 }
569 })
570 )
571
572const getClassDeclarationSignature = (c: ast.ClassDeclaration) => {
573 const name = c.getName() ?? ""

Callers 1

Calls 1

pipeFunction · 0.50

Tested by

no test coverage detected