MCPcopy Create free account
hub / github.com/nodejs/node / generateGetAccessor

Function generateGetAccessor

test/fixtures/snapshot/typescript.js:158171–158178  ·  view source on GitHub ↗
(fieldName, accessorName, type, modifiers, isStatic, container)

Source from the content-addressed store, hash-verified

158169 }
158170 codefix.getAccessorConvertiblePropertyAtPosition = getAccessorConvertiblePropertyAtPosition;
158171 function generateGetAccessor(fieldName, accessorName, type, modifiers, isStatic, container) {
158172 return ts.factory.createGetAccessorDeclaration(
158173 /*decorators*/ undefined, modifiers, accessorName,
158174 /*parameters*/ undefined, // TODO: GH#18217
158175 type, ts.factory.createBlock([
158176 ts.factory.createReturnStatement(createAccessorAccessExpression(fieldName, isStatic, container))
158177 ], /*multiLine*/ true));
158178 }
158179 function generateSetAccessor(fieldName, accessorName, type, modifiers, isStatic, container) {
158180 return ts.factory.createSetAccessorDeclaration(
158181 /*decorators*/ undefined, modifiers, accessorName, [ts.factory.createParameterDeclaration(

Callers 1

Calls 1

Tested by

no test coverage detected