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.8.0-dev.20180419 to 0.8.0-dev.20180420

2

package.json
{
"name": "@fimbul/mimir",
"version": "0.8.0-dev.20180419",
"version": "0.8.0-dev.20180420",
"description": "Core rules of the Fimbullinter project",

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

@@ -7,3 +7,2 @@ import { TypedRule } from '@fimbul/ymir';

private checkNewExpression(node);
private checkSignature(signature, declaration, node);
private checkInferredTypeParameters(signature, typeParameters, node);

@@ -10,0 +9,0 @@ private scannerFallback(signature, typeParameters, node);

@@ -33,9 +33,15 @@ "use strict";

const signature = this.checker.getResolvedSignature(node);
if (signature.declaration !== undefined)
return this.checkSignature(signature, signature.declaration, node);
if (signature.declaration !== undefined) {
const typeParameters = getTypeParameters(signature.declaration);
if (typeParameters !== undefined)
return this.checkInferredTypeParameters(signature, typeParameters, node);
}
}
checkNewExpression(node) {
const signature = this.checker.getResolvedSignature(node);
if (signature.declaration !== undefined)
return this.checkSignature(signature, signature.declaration, node);
if (signature.declaration !== undefined) {
const typeParameters = getTypeParameters(signature.declaration);
if (typeParameters !== undefined)
return this.checkInferredTypeParameters(signature, typeParameters, node);
}
const { symbol } = this.checker.getTypeAtLocation(node.expression);

@@ -45,3 +51,4 @@ if (symbol === undefined || symbol.declarations === undefined)

const typeParameterResult = [];
for (const { typeParameters } of symbol.declarations) {
for (const declaration of symbol.declarations) {
const typeParameters = getTypeParameters(declaration);
if (typeParameters === undefined)

@@ -56,11 +63,2 @@ continue;

}
checkSignature(signature, declaration, node) {
const typeParameters = declaration.typeParameters !== undefined
? declaration.typeParameters
: declaration.flags & ts.NodeFlags.JavaScriptFile
? getTemplateTags(declaration)
: undefined;
if (typeParameters !== undefined)
return this.checkInferredTypeParameters(signature, typeParameters, node);
}
checkInferredTypeParameters(signature, typeParameters, node) {

@@ -124,10 +122,9 @@ if (typescriptPre270)

exports.Rule = Rule;
function getTemplateTags(node) {
for (const jsDoc of tsutils_1.getJsDoc(node))
if (jsDoc.tags !== undefined)
for (const tag of jsDoc.tags)
if (tag.kind === ts.SyntaxKind.JSDocTemplateTag)
return tag.typeParameters;
return;
function getTypeParameters(node) {
if (node.flags & ts.NodeFlags.JavaScriptFile) {
const tag = ts.getJSDocTemplateTag(node);
return tag && tag.typeParameters;
}
return node.typeParameters;
}
//# sourceMappingURL=no-inferred-empty-object.js.map

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