Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@putout/printer

Package Overview
Dependencies
Maintainers
1
Versions
596
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/printer - npm Package Compare versions

Comparing version 8.38.0 to 8.39.0

lib/tokenize/expressions/function/kind.js

31

lib/tokenize/expressions/function/class-method.js

@@ -6,19 +6,10 @@ 'use strict';

const {maybeDecorators} = require('../../maybe/maybe-decorators');
const {printKey} = require('./kind');
const ClassMethod = {
print: maybeDecorators((path, printer, semantics) => {
const {print, maybe} = printer;
const {print} = printer;
const {node} = path;
const {
kind,
computed,
generator,
accessibility,
returnType,
} = node;
const {accessibility, returnType} = node;
const isConstructor = kind === 'constructor';
const isMethod = kind === 'method';
const isGetter = /get|set/.test(kind);
if (accessibility) {

@@ -39,17 +30,3 @@ print(accessibility);

maybe.print(generator, '*');
maybe.print(isConstructor, kind);
if (isMethod) {
maybe.print(computed, '[');
print('__key');
maybe.print(computed, ']');
}
if (isGetter) {
print(kind);
print(' ');
print('__key');
}
printKey(path, printer);
printParams(path, printer, semantics);

@@ -56,0 +33,0 @@

@@ -5,2 +5,3 @@ 'use strict';

const {printParams} = require('./params');
const {printKey} = require('./kind');

@@ -15,19 +16,5 @@ module.exports.ObjectMethod = {

print(path, printer, semantics) {
const {print, maybe} = printer;
const {print} = printer;
const {
kind,
generator,
computed,
} = path.node;
const notMethod = kind !== 'method';
maybe.print(notMethod, `${kind} `);
maybe.print(generator, '*');
maybe.print(computed, '[');
print('__key');
maybe.print(computed, ']');
printKey(path, printer);
printParams(path, printer, semantics);

@@ -34,0 +21,0 @@

'use strict';
const {printParams} = require('../../expressions/function/params');
const {printKey} = require('../../expressions/function/kind');
const {

@@ -11,5 +11,5 @@ hasReturnType,

module.exports.TSMethodSignature = (path, printer, semantics) => {
const {traverse, write} = printer;
const {write} = printer;
traverse(path.get('key'));
printKey(path, printer);
printParams(path, printer, semantics);

@@ -16,0 +16,0 @@

{
"name": "@putout/printer",
"version": "8.38.0",
"version": "8.39.0",
"type": "commonjs",

@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc