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.4 to 4.1.5

tests/features/generates_type_guards_for_interfaces_with_constant_keys.test.ts

15

lib/index.js

@@ -106,2 +106,6 @@ "use strict";

}
function propertyName(signature) {
var _a, _b;
return ((_b = (_a = signature.getNameNode().getSymbol()) === null || _a === void 0 ? void 0 : _a.compilerSymbol.escapedName) !== null && _b !== void 0 ? _b : signature.getName());
}
function typeToDependency(type, addDependency) {

@@ -347,9 +351,6 @@ var exportable = findExportableNode(type);

// getProperties does not include methods like `foo(): void`
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(),
});
});
var properties = __spreadArray(__spreadArray([], __read(declaration.getProperties()), false), __read(declaration.getMethods()), false).map(function (p) { return ({
name: propertyName(p),
type: p.getType(),
}); });
conditions.push.apply(conditions, __spreadArray([], __read(propertiesConditions(varName, properties, addDependency, project, path, arrayDepth, records, outFile, options)), false));

@@ -356,0 +357,0 @@ var indexSignatures = declaration

{
"name": "ts-auto-guard",
"version": "4.1.4",
"version": "4.1.5",
"description": "Generate type guard functions from TypeScript interfaces",

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

@@ -25,2 +25,7 @@ # ts-auto-guard

## TypeScript configuration
It makes sense to use this library in `strict` mode. Make sure to turn on the [strict mode family](https://www.typescriptlang.org/tsconfig#strict) options by defining `"strict": true` in `tsconfig.json` under `compilerOptions`.
If you have any problems check that strict mode family options, such as `strictNullChecks`, are not explicitly set to false. Check [these](https://github.com/rhys-vdw/ts-auto-guard/issues/120) [issues](https://github.com/rhys-vdw/ts-auto-guard/issues/152) for more info.
## Usage

@@ -27,0 +32,0 @@

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