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

@fimbul/mimir

Package Overview
Dependencies
Maintainers
2
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fimbul/mimir - npm Package Compare versions

Comparing version 0.21.0-dev.20190412 to 0.21.0-dev.20190507

2

package.json
{
"name": "@fimbul/mimir",
"version": "0.21.0-dev.20190412",
"version": "0.21.0-dev.20190507",
"description": "Core rules of the Fimbullinter project",

@@ -5,0 +5,0 @@ "main": "recommended.yaml",

@@ -60,2 +60,3 @@ "use strict";

case ts.SyntaxKind.CallExpression:
case ts.SyntaxKind.NewExpression:
expr = node.expression;

@@ -69,3 +70,3 @@ break;

}
const signatures = this.checker.getTypeAtLocation(expr).getCallSignatures();
const signatures = this.checker.getSignaturesOfType(this.checker.getTypeAtLocation(expr), node.kind === ts.SyntaxKind.NewExpression ? ts.SignatureKind.Construct : ts.SignatureKind.Call);
// abort if not all signatures have type parameters:

@@ -101,5 +102,7 @@ // higher order function type inference only works for a single call signature

// There is an explicitly declared construct signature
const typeParameters = ts.getEffectiveTypeParameterDeclarations(signature.declaration);
let typeParameters = ts.getEffectiveTypeParameterDeclarations(signature.declaration).map(mapTypeParameterDeclaration);
if (typeParameters.length === 0)
typeParameters = this.getTypeParametersOfCallSignature(node);
if (typeParameters.length !== 0) // only check the signature if it declares type parameters
return this.checkInferredTypeParameters(signature, typeParameters.map(mapTypeParameterDeclaration), node);
return this.checkInferredTypeParameters(signature, typeParameters, node);
if (signature.declaration.kind !== ts.SyntaxKind.Constructor)

@@ -106,0 +109,0 @@ return; // don't look for type parameters on non-class parents

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