(m: ts.MethodDeclaration, body: ts.FunctionBody)
| 9 | } |
| 10 | |
| 11 | export 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 | |
| 25 | export function createNodeFromSource<T extends ts.Node>(source: string, kind: ts.SyntaxKind): T { |
| 26 | const sourceFile = ts.createSourceFile( |
no outgoing calls
no test coverage detected