Socket
Socket
Sign inDemoInstall

@typescript-eslint/type-utils

Package Overview
Dependencies
Maintainers
0
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 7.13.2-alpha.2 to 7.13.2-alpha.3

17

dist/builtinSymbolLikes.js

@@ -26,3 +26,10 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isBuiltinSymbolLikeRecurser = exports.isBuiltinSymbolLike = exports.isBuiltinTypeAliasLike = exports.isReadonlyTypeLike = exports.isReadonlyErrorLike = exports.isErrorLike = exports.isPromiseConstructorLike = exports.isPromiseLike = void 0;
exports.isPromiseLike = isPromiseLike;
exports.isPromiseConstructorLike = isPromiseConstructorLike;
exports.isErrorLike = isErrorLike;
exports.isReadonlyErrorLike = isReadonlyErrorLike;
exports.isReadonlyTypeLike = isReadonlyTypeLike;
exports.isBuiltinTypeAliasLike = isBuiltinTypeAliasLike;
exports.isBuiltinSymbolLike = isBuiltinSymbolLike;
exports.isBuiltinSymbolLikeRecurser = isBuiltinSymbolLikeRecurser;
const ts = __importStar(require("typescript"));

@@ -41,3 +48,2 @@ const isSymbolFromDefaultLibrary_1 = require("./isSymbolFromDefaultLibrary");

}
exports.isPromiseLike = isPromiseLike;
/**

@@ -54,3 +60,2 @@ * @example

}
exports.isPromiseConstructorLike = isPromiseConstructorLike;
/**

@@ -67,3 +72,2 @@ * @example

}
exports.isErrorLike = isErrorLike;
/**

@@ -83,3 +87,2 @@ * @example

}
exports.isReadonlyErrorLike = isReadonlyErrorLike;
/**

@@ -97,3 +100,2 @@ * @example

}
exports.isReadonlyTypeLike = isReadonlyTypeLike;
function isBuiltinTypeAliasLike(program, type, predicate) {

@@ -112,3 +114,2 @@ return isBuiltinSymbolLikeRecurser(program, type, subtype => {

}
exports.isBuiltinTypeAliasLike = isBuiltinTypeAliasLike;
function isBuiltinSymbolLike(program, type, symbolName) {

@@ -127,3 +128,2 @@ return isBuiltinSymbolLikeRecurser(program, type, subType => {

}
exports.isBuiltinSymbolLike = isBuiltinSymbolLike;
function isBuiltinSymbolLikeRecurser(program, type, predicate) {

@@ -152,3 +152,2 @@ if (type.isIntersection()) {

}
exports.isBuiltinSymbolLikeRecurser = isBuiltinSymbolLikeRecurser;
//# sourceMappingURL=builtinSymbolLikes.js.map

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.containsAllTypesByName = void 0;
exports.containsAllTypesByName = containsAllTypesByName;
const tsutils = __importStar(require("ts-api-utils"));

@@ -61,3 +61,2 @@ const ts = __importStar(require("typescript"));

}
exports.containsAllTypesByName = containsAllTypesByName;
//# sourceMappingURL=containsAllTypesByName.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConstrainedTypeAtLocation = void 0;
exports.getConstrainedTypeAtLocation = getConstrainedTypeAtLocation;
/**

@@ -14,3 +14,2 @@ * Resolves the given node's type. Will resolve to the type's generic constraint, if it has one.

}
exports.getConstrainedTypeAtLocation = getConstrainedTypeAtLocation;
//# sourceMappingURL=getConstrainedTypeAtLocation.js.map

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getContextualType = void 0;
exports.getContextualType = getContextualType;
const ts = __importStar(require("typescript"));

@@ -68,3 +68,2 @@ /**

}
exports.getContextualType = getContextualType;
//# sourceMappingURL=getContextualType.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDeclaration = void 0;
exports.getDeclaration = getDeclaration;
/**

@@ -15,3 +15,2 @@ * Gets the declaration for the given variable

}
exports.getDeclaration = getDeclaration;
//# sourceMappingURL=getDeclaration.js.map

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getSourceFileOfNode = void 0;
exports.getSourceFileOfNode = getSourceFileOfNode;
const ts = __importStar(require("typescript"));

@@ -38,3 +38,2 @@ /**

}
exports.getSourceFileOfNode = getSourceFileOfNode;
//# sourceMappingURL=getSourceFileOfNode.js.map

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getTokenAtPosition = void 0;
exports.getTokenAtPosition = getTokenAtPosition;
const ts = __importStar(require("typescript"));

@@ -52,4 +52,3 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */

}
exports.getTokenAtPosition = getTokenAtPosition;
/* eslint-enable @typescript-eslint/no-non-null-assertion */
//# sourceMappingURL=getTokenAtPosition.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTypeArguments = void 0;
exports.getTypeArguments = getTypeArguments;
/**

@@ -15,3 +15,2 @@ * @deprecated This is in TypeScript as of 3.7.

}
exports.getTypeArguments = getTypeArguments;
//# sourceMappingURL=getTypeArguments.js.map

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getTypeName = void 0;
exports.getTypeName = getTypeName;
const ts = __importStar(require("typescript"));

@@ -74,3 +74,2 @@ /**

}
exports.getTypeName = getTypeName;
//# sourceMappingURL=getTypeName.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSymbolFromDefaultLibrary = void 0;
exports.isSymbolFromDefaultLibrary = isSymbolFromDefaultLibrary;
function isSymbolFromDefaultLibrary(program, symbol) {

@@ -17,3 +17,2 @@ if (!symbol) {

}
exports.isSymbolFromDefaultLibrary = isSymbolFromDefaultLibrary;
//# sourceMappingURL=isSymbolFromDefaultLibrary.js.map

@@ -26,3 +26,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isTypeReadonly = exports.readonlynessOptionsDefaults = exports.readonlynessOptionsSchema = void 0;
exports.readonlynessOptionsDefaults = exports.readonlynessOptionsSchema = void 0;
exports.isTypeReadonly = isTypeReadonly;
const utils_1 = require("@typescript-eslint/utils");

@@ -226,3 +227,2 @@ const tsutils = __importStar(require("ts-api-utils"));

}
exports.isTypeReadonly = isTypeReadonly;
//# sourceMappingURL=isTypeReadonly.js.map

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isUnsafeAssignment = void 0;
exports.isUnsafeAssignment = isUnsafeAssignment;
const utils_1 = require("@typescript-eslint/utils");

@@ -44,3 +44,2 @@ const tsutils = __importStar(require("ts-api-utils"));

}
exports.isUnsafeAssignment = isUnsafeAssignment;
function isUnsafeAssignmentWorker(type, receiver, checker, senderNode, visited) {

@@ -47,0 +46,0 @@ if ((0, predicates_1.isTypeAnyType)(type)) {

@@ -29,3 +29,15 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isTypeTemplateLiteralType = exports.isTypeBigIntLiteralType = exports.typeIsOrHasBaseType = exports.isAnyOrAnyArrayTypeDiscriminated = exports.AnyType = exports.isTypeUnknownArrayType = exports.isTypeAnyArrayType = exports.isTypeAnyType = exports.isTypeReferenceType = exports.isTypeUnknownType = exports.isTypeNeverType = exports.isTypeArrayTypeOrUnionOfArrayTypes = exports.isNullableType = void 0;
exports.AnyType = void 0;
exports.isNullableType = isNullableType;
exports.isTypeArrayTypeOrUnionOfArrayTypes = isTypeArrayTypeOrUnionOfArrayTypes;
exports.isTypeNeverType = isTypeNeverType;
exports.isTypeUnknownType = isTypeUnknownType;
exports.isTypeReferenceType = isTypeReferenceType;
exports.isTypeAnyType = isTypeAnyType;
exports.isTypeAnyArrayType = isTypeAnyArrayType;
exports.isTypeUnknownArrayType = isTypeUnknownArrayType;
exports.isAnyOrAnyArrayTypeDiscriminated = isAnyOrAnyArrayTypeDiscriminated;
exports.typeIsOrHasBaseType = typeIsOrHasBaseType;
exports.isTypeBigIntLiteralType = isTypeBigIntLiteralType;
exports.isTypeTemplateLiteralType = isTypeTemplateLiteralType;
const debug_1 = __importDefault(require("debug"));

@@ -45,3 +57,2 @@ const tsutils = __importStar(require("ts-api-utils"));

}
exports.isNullableType = isNullableType;
/**

@@ -59,3 +70,2 @@ * Checks if the given type is either an array type,

}
exports.isTypeArrayTypeOrUnionOfArrayTypes = isTypeArrayTypeOrUnionOfArrayTypes;
/**

@@ -67,3 +77,2 @@ * @returns true if the type is `never`

}
exports.isTypeNeverType = isTypeNeverType;
/**

@@ -75,3 +84,2 @@ * @returns true if the type is `unknown`

}
exports.isTypeUnknownType = isTypeUnknownType;
// https://github.com/microsoft/TypeScript/blob/42aa18bf442c4df147e30deaf27261a41cbdc617/src/compiler/types.ts#L5157

@@ -93,3 +101,2 @@ const Nullable = ts.TypeFlags.Undefined | ts.TypeFlags.Null;

}
exports.isTypeReferenceType = isTypeReferenceType;
/**

@@ -107,3 +114,2 @@ * @returns true if the type is `any`

}
exports.isTypeAnyType = isTypeAnyType;
/**

@@ -116,3 +122,2 @@ * @returns true if the type is `any[]`

}
exports.isTypeAnyArrayType = isTypeAnyArrayType;
/**

@@ -125,3 +130,2 @@ * @returns true if the type is `unknown[]`

}
exports.isTypeUnknownArrayType = isTypeUnknownArrayType;
var AnyType;

@@ -147,3 +151,2 @@ (function (AnyType) {

}
exports.isAnyOrAnyArrayTypeDiscriminated = isAnyOrAnyArrayTypeDiscriminated;
/**

@@ -170,11 +173,8 @@ * @returns Whether a type is an instance of the parent type, including for the parent's base types.

}
exports.typeIsOrHasBaseType = typeIsOrHasBaseType;
function isTypeBigIntLiteralType(type) {
return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.BigIntLiteral);
}
exports.isTypeBigIntLiteralType = isTypeBigIntLiteralType;
function isTypeTemplateLiteralType(type) {
return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.TemplateLiteral);
}
exports.isTypeTemplateLiteralType = isTypeTemplateLiteralType;
//# sourceMappingURL=predicates.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTypeOfPropertyOfType = exports.getTypeOfPropertyOfName = void 0;
exports.getTypeOfPropertyOfName = getTypeOfPropertyOfName;
exports.getTypeOfPropertyOfType = getTypeOfPropertyOfType;
function getTypeOfPropertyOfName(checker, type, name, escapedName) {

@@ -18,7 +19,5 @@ // Most names are directly usable in the checker and aren't different from escaped names

}
exports.getTypeOfPropertyOfName = getTypeOfPropertyOfName;
function getTypeOfPropertyOfType(checker, type, property) {
return getTypeOfPropertyOfName(checker, type, property.getName(), property.getEscapedName());
}
exports.getTypeOfPropertyOfType = getTypeOfPropertyOfType;
// Symbolic names need to be specially handled because TS api is not sufficient for these cases.

@@ -25,0 +24,0 @@ // Source based on:

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.requiresQuoting = void 0;
exports.requiresQuoting = requiresQuoting;
const ts = __importStar(require("typescript"));

@@ -44,3 +44,2 @@ /*** Indicates whether identifiers require the use of quotation marks when accessing property definitions and dot notation. */

}
exports.requiresQuoting = requiresQuoting;
//# sourceMappingURL=requiresQuoting.js.map

@@ -26,3 +26,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isTypeFlagSet = exports.getTypeFlags = void 0;
exports.getTypeFlags = getTypeFlags;
exports.isTypeFlagSet = isTypeFlagSet;
const tsutils = __importStar(require("ts-api-utils"));

@@ -42,3 +43,2 @@ const ts = __importStar(require("typescript"));

}
exports.getTypeFlags = getTypeFlags;
/**

@@ -63,3 +63,2 @@ * @param flagsToCheck The composition of one or more `ts.TypeFlags`.

}
exports.isTypeFlagSet = isTypeFlagSet;
//# sourceMappingURL=typeFlagUtils.js.map

@@ -29,3 +29,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.typeMatchesSpecifier = exports.typeOrValueSpecifierSchema = void 0;
exports.typeOrValueSpecifierSchema = void 0;
exports.typeMatchesSpecifier = typeMatchesSpecifier;
const typescript_estree_1 = require("@typescript-eslint/typescript-estree");

@@ -188,3 +189,2 @@ const path_1 = __importDefault(require("path"));

}
exports.typeMatchesSpecifier = typeMatchesSpecifier;
//# sourceMappingURL=TypeOrValueSpecifier.js.map
{
"name": "@typescript-eslint/type-utils",
"version": "7.13.2-alpha.2",
"version": "7.13.2-alpha.3",
"description": "Type utilities for working with TypeScript + ESLint together",

@@ -49,4 +49,4 @@ "files": [

"dependencies": {
"@typescript-eslint/typescript-estree": "7.13.2-alpha.2",
"@typescript-eslint/utils": "7.13.2-alpha.2",
"@typescript-eslint/typescript-estree": "7.13.2-alpha.3",
"@typescript-eslint/utils": "7.13.2-alpha.3",
"debug": "^4.3.4",

@@ -57,3 +57,3 @@ "ts-api-utils": "^1.3.0"

"@jest/types": "29.6.3",
"@typescript-eslint/parser": "7.13.2-alpha.2",
"@typescript-eslint/parser": "7.13.2-alpha.3",
"ajv": "^6.12.6",

@@ -60,0 +60,0 @@ "downlevel-dts": "*",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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