MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / setMethodBody

Function setMethodBody

packages/transpiler/src/BuilderHelpers.ts:11–23  ·  view source on GitHub ↗
(m: ts.MethodDeclaration, body: ts.FunctionBody)

Source from the content-addressed store, hash-verified

9}
10
11export function setMethodBody(m: ts.MethodDeclaration, body: ts.FunctionBody): ts.MethodDeclaration {
12 return ts.factory.updateMethodDeclaration(
13 m,
14 m.modifiers,
15 m.asteriskToken,
16 m.name,
17 m.questionToken,
18 m.typeParameters,
19 m.parameters,
20 m.type,
21 body
22 );
23}
24
25export function createNodeFromSource<T extends ts.Node>(source: string, kind: ts.SyntaxKind): T {
26 const sourceFile = ts.createSourceFile(

Callers 3

createToJsonMethodFunction · 0.90
createFromJsonMethodFunction · 0.90
createSetPropertyMethodFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected