MCPcopy Create free account
hub / github.com/ASDAlexander77/TypeScript2Cxx / processFunctionDeclaration

Method processFunctionDeclaration

src/emitter.ts:822–834  ·  view source on GitHub ↗
(node: ts.FunctionDeclaration)

Source from the content-addressed store, hash-verified

820 }
821
822 private processFunctionDeclaration(node: ts.FunctionDeclaration): void {
823 if (node.modifiers && node.modifiers.some(m => m.kind === ts.SyntaxKind.DeclareKeyword)) {
824 // skip it, as it is only declaration
825 return;
826 }
827
828 this.scope.push(node);
829 this.processFunctionExpression(<ts.FunctionExpression><any>node);
830 this.scope.pop();
831
832 this.writer.EndOfStatement();
833 this.writer.writeStringNewLine();
834 }
835
836 private processReturnStatement(node: ts.ReturnStatement): void {
837 this.writer.writeString('return');

Callers 1

Calls 3

EndOfStatementMethod · 0.80
writeStringNewLineMethod · 0.80

Tested by

no test coverage detected