Socket
Socket
Sign inDemoInstall

@typescript-eslint/type-utils

Package Overview
Dependencies
Maintainers
1
Versions
2151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/type-utils - npm Package Compare versions

Comparing version 5.9.2-alpha.21 to 5.9.2-alpha.23

30

dist/isTypeReadonly.js

@@ -83,5 +83,6 @@ "use strict";

if (indexInfo) {
return indexInfo.isReadonly
? 3 /* Readonly */
: 2 /* Mutable */;
if (!indexInfo.isReadonly) {
return 2 /* Mutable */;
}
return isTypeReadonlyRecurser(checker, indexInfo.type, options, seenTypes);
}

@@ -94,9 +95,22 @@ return 1 /* UnknownType */;

for (const property of properties) {
if (!((0, tsutils_1.isPropertyReadonlyInType)(type, property.getEscapedName(), checker) ||
(options.treatMethodsAsReadonly &&
property.valueDeclaration !== undefined &&
if (options.treatMethodsAsReadonly) {
if (property.valueDeclaration !== undefined &&
hasSymbol(property.valueDeclaration) &&
(0, tsutils_1.isSymbolFlagSet)(property.valueDeclaration.symbol, ts.SymbolFlags.Method)))) {
return 2 /* Mutable */;
(0, tsutils_1.isSymbolFlagSet)(property.valueDeclaration.symbol, ts.SymbolFlags.Method)) {
continue;
}
const declarations = property.getDeclarations();
const lastDeclaration = declarations !== undefined && declarations.length > 0
? declarations[declarations.length - 1]
: undefined;
if (lastDeclaration !== undefined &&
hasSymbol(lastDeclaration) &&
(0, tsutils_1.isSymbolFlagSet)(lastDeclaration.symbol, ts.SymbolFlags.Method)) {
continue;
}
}
if ((0, tsutils_1.isPropertyReadonlyInType)(type, property.getEscapedName(), checker)) {
continue;
}
return 2 /* Mutable */;
}

@@ -103,0 +117,0 @@ // all properties were readonly

{
"name": "@typescript-eslint/type-utils",
"version": "5.9.2-alpha.21+e56f1e5d",
"version": "5.9.2-alpha.23+ef3147cf",
"description": "Type utilities for working with TypeScript + ESLint together",

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

"dependencies": {
"@typescript-eslint/utils": "5.9.2-alpha.21+e56f1e5d",
"@typescript-eslint/utils": "5.9.2-alpha.23+ef3147cf",
"debug": "^4.3.2",

@@ -48,3 +48,3 @@ "tsutils": "^3.21.0"

"devDependencies": {
"@typescript-eslint/parser": "5.9.2-alpha.21+e56f1e5d",
"@typescript-eslint/parser": "5.9.2-alpha.23+ef3147cf",
"typescript": "*"

@@ -71,3 +71,3 @@ },

},
"gitHead": "e56f1e5d52fcbf3caae43034872e0b3181871689"
"gitHead": "ef3147cf73767ddece91ce57f6028a83ce074b60"
}

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