New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ts-auto-guard

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-auto-guard - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

tests/features/generates_type_guards_for_interface_property_with_quoted_strings_as_names.test.ts

12

lib/index.js

@@ -345,3 +345,9 @@ "use strict";

// getProperties does not include methods like `foo(): void`
var properties = __spreadArray(__spreadArray([], __read(declaration.getProperties()), false), __read(declaration.getMethods()), false).map(function (p) { return ({ name: p.getName(), type: p.getType() }); });
var properties = __spreadArray(__spreadArray([], __read(declaration.getProperties()), false), __read(declaration.getMethods()), false).map(function (p) {
var _a, _b;
return ({
name: (_b = (_a = p.getSymbol()) === null || _a === void 0 ? void 0 : _a.getEscapedName()) !== null && _b !== void 0 ? _b : p.getName(),
type: p.getType(),
});
});
conditions.push.apply(conditions, __spreadArray([], __read(propertiesConditions(varName, properties, addDependency, project, path, arrayDepth, records, outFile, options)), false));

@@ -788,3 +794,5 @@ var indexSignatures = declaration

var exportStatement = "export { ".concat(options.importGuards, " };");
var _f = sourceFile.getStatements().reduce(function (reduced, node) {
var _f = sourceFile
.getStatements()
.reduce(function (reduced, node) {
var nodeText = node.getText().replace(/\s{2,}/g, ' ');

@@ -791,0 +799,0 @@ reduced.hasImport || (reduced.hasImport = nodeText.includes("import * as ".concat(options.importGuards)));

10

package.json
{
"name": "ts-auto-guard",
"version": "4.1.0",
"version": "4.1.1",
"description": "Generate type guard functions from TypeScript interfaces",

@@ -34,7 +34,7 @@ "homepage": "https://github.com/rhys-vdw/ts-auto-guard",

"@types/uglify-js": "^3.11.1",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"cross-env": "^7.0.2",
"eslint": "~8.22.0",
"prettier": "^2.1.2",
"eslint": "~8.27.0",
"prettier": "^2.7.1",
"tape": "^5.0.1",

@@ -41,0 +41,0 @@ "ts-node": "^10.9.1",

Sorry, the diff of this file is not supported yet

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