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

@typescript-eslint/scope-manager

Package Overview
Dependencies
Maintainers
1
Versions
3178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/scope-manager - npm Package Compare versions

Comparing version 4.0.2-alpha.18 to 4.0.2-alpha.19

7

dist/scope/ScopeBase.d.ts

@@ -11,2 +11,4 @@ import { TSESTree } from '@typescript-eslint/types';

import { Variable } from '../variable';
import { TSModuleScope } from './TSModuleScope';
declare type VariableScope = GlobalScope | FunctionScope | ModuleScope | TSModuleScope;
declare abstract class ScopeBase<TType extends ScopeType, TBlock extends TSESTree.Node, TUpper extends Scope | null> {

@@ -80,8 +82,9 @@ #private;

/**
* For 'global', 'function', and 'module' scopes, this is a self-reference.
* For scopes that can contain variable declarations, this is a self-reference.
* For other scope types this is the *variableScope* value of the parent scope.
* @public
*/
readonly variableScope: GlobalScope | FunctionScope | ModuleScope;
readonly variableScope: VariableScope;
constructor(scopeManager: ScopeManager, type: TType, upperScope: TUpper, block: TBlock, isMethodDefinition: boolean);
private isVariableScope;
shouldStaticallyClose(): boolean;

@@ -88,0 +91,0 @@ private shouldStaticallyCloseForGlobal;

@@ -114,2 +114,8 @@ "use strict";

const generator = ID_1.createIdGenerator();
const VARIABLE_SCOPE_TYPES = new Set([
ScopeType_1.ScopeType.global,
ScopeType_1.ScopeType.function,
ScopeType_1.ScopeType.module,
ScopeType_1.ScopeType.tsModule,
]);
class ScopeBase {

@@ -220,8 +226,5 @@ constructor(scopeManager, type, upperScope, block, isMethodDefinition) {

this.block = block;
this.variableScope =
this.type === 'global' ||
this.type === 'function' ||
this.type === 'module'
? this
: upperScopeAsScopeBase.variableScope;
this.variableScope = this.isVariableScope()
? this
: upperScopeAsScopeBase.variableScope;
this.upper = upperScope;

@@ -240,2 +243,5 @@ /**

}
isVariableScope() {
return VARIABLE_SCOPE_TYPES.has(this.type);
}
shouldStaticallyClose() {

@@ -242,0 +248,0 @@ return !__classPrivateFieldGet(this, _dynamic);

{
"name": "@typescript-eslint/scope-manager",
"version": "4.0.2-alpha.18+2ada5aff",
"version": "4.0.2-alpha.19+3d07a99f",
"description": "TypeScript scope analyser for ESLint",

@@ -42,8 +42,8 @@ "keywords": [

"dependencies": {
"@typescript-eslint/types": "4.0.2-alpha.18+2ada5aff",
"@typescript-eslint/visitor-keys": "4.0.2-alpha.18+2ada5aff"
"@typescript-eslint/types": "4.0.2-alpha.19+3d07a99f",
"@typescript-eslint/visitor-keys": "4.0.2-alpha.19+3d07a99f"
},
"devDependencies": {
"@types/glob": "*",
"@typescript-eslint/typescript-estree": "4.0.2-alpha.18+2ada5aff",
"@typescript-eslint/typescript-estree": "4.0.2-alpha.19+3d07a99f",
"glob": "*",

@@ -68,3 +68,3 @@ "jest-specific-snapshot": "*",

},
"gitHead": "2ada5aff1ef37bc260d7a0eaafe9ff04f8a08fe4"
"gitHead": "3d07a99faa0a5fc1b44acdb43ddbfc90a5105833"
}

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