MCPcopy
hub / github.com/prettier/prettier / printClassMethod

Function printClassMethod

src/language-js/print/class.js:275–298  ·  view source on GitHub ↗
(path, options, print)

Source from the content-addressed store, hash-verified

273}
274
275function printClassMethod(path, options, print) {
276 const { node } = path;
277 const parts = [];
278
279 if (isNonEmptyArray(node.decorators)) {
280 parts.push(printClassMemberDecorators(path, options, print));
281 }
282
283 parts.push(printTypeScriptAccessibilityToken(node));
284
285 if (node.static) {
286 parts.push("static ");
287 }
288
289 parts.push(printAbstractToken(path));
290
291 if (node.override) {
292 parts.push("override ");
293 }
294
295 parts.push(printMethod(path, options, print));
296
297 return parts;
298}
299
300/*
301- `ClassProperty`

Callers 2

printEstreeFunction · 0.90
printTypescriptFunction · 0.90

Calls 5

printAbstractTokenFunction · 0.90
printMethodFunction · 0.90
isNonEmptyArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…