Comparing version 1.0.3 to 1.0.4
@@ -8,3 +8,6 @@ import * as ts from 'typescript'; | ||
if (node.expression.getText() === 'named') { | ||
if (ts.isVariableDeclaration(node.parent) || ts.isPropertyDeclaration(node.parent)) { | ||
if (ts.isVariableDeclaration(node.parent) || // const v = named(id => ...) | ||
ts.isPropertyDeclaration(node.parent) || // class C { v = named(id => ...) } | ||
ts.isPropertyAssignment(node.parent) // const c = { p: named(id => ...) } | ||
) { | ||
if (ts.isArrowFunction(node.arguments[0])) { | ||
@@ -11,0 +14,0 @@ var expression = node.arguments[0]; |
@@ -10,3 +10,6 @@ 'use strict'; | ||
if (node.expression.getText() === 'named') { | ||
if (ts.isVariableDeclaration(node.parent) || ts.isPropertyDeclaration(node.parent)) { | ||
if (ts.isVariableDeclaration(node.parent) || // const v = named(id => ...) | ||
ts.isPropertyDeclaration(node.parent) || // class C { v = named(id => ...) } | ||
ts.isPropertyAssignment(node.parent) // const c = { p: named(id => ...) } | ||
) { | ||
if (ts.isArrowFunction(node.arguments[0])) { | ||
@@ -13,0 +16,0 @@ var expression = node.arguments[0]; |
{ | ||
"name": "ts-named", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Ts-Named : TypeScript Transformer for extracting variable name", | ||
@@ -5,0 +5,0 @@ "author": "Ozan Gunalp <ozangunalp@gmail.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10764
126