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

typescript-is

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-is - npm Package Compare versions

Comparing version 0.12.6 to 0.13.0

4

lib/transform-inline/visitor-indexed-access.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ts = require("typescript");
const tsutils = require("tsutils");
const tsutils = require("tsutils/typeguard/3.0");
const VisitorUtils = require("./visitor-utils");

@@ -200,3 +200,3 @@ const VisitorIsNumber = require("./visitor-is-number");

}
else if ((ts.TypeFlags.BigInt & type.flags) !== 0) {
else if (VisitorUtils.isBigIntType(type)) {
// BigInt

@@ -203,0 +203,0 @@ return visitBigInt();

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ts = require("typescript");
const tsutils = require("tsutils");
const tsutils = require("tsutils/typeguard/3.0");
const VisitorUtils = require("./visitor-utils");

@@ -157,3 +157,3 @@ function visitRegularObjectType() {

}
else if ((ts.TypeFlags.BigInt & type.flags) !== 0) {
else if (VisitorUtils.isBigIntType(type)) {
// BigInt

@@ -160,0 +160,0 @@ return visitBigInt();

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ts = require("typescript");
const tsutils = require("tsutils");
const tsutils = require("tsutils/typeguard/3.0");
const VisitorUtils = require("./visitor-utils");

@@ -178,3 +178,3 @@ const utils_1 = require("./utils");

}
else if ((ts.TypeFlags.BigInt & type.flags) !== 0) {
else if (VisitorUtils.isBigIntType(type)) {
// BigInt

@@ -181,0 +181,0 @@ return visitBigInt();

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ts = require("typescript");
const tsutils = require("tsutils");
const tsutils = require("tsutils/typeguard/3.0");
const VisitorUtils = require("./visitor-utils");

@@ -165,3 +165,3 @@ const VisitorIsStringKeyof = require("./visitor-is-string-keyof");

}
else if ((ts.TypeFlags.BigInt & type.flags) !== 0) {
else if (VisitorUtils.isBigIntType(type)) {
// BigInt

@@ -168,0 +168,0 @@ return visitBigInt();

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ts = require("typescript");
const tsutils = require("tsutils");
const tsutils = require("tsutils/typeguard/3.0");
const VisitorUtils = require("./visitor-utils");

@@ -164,3 +164,3 @@ const VisitorTypeName = require("./visitor-type-name");

}
else if ((ts.TypeFlags.BigInt & type.flags) !== 0) {
else if (VisitorUtils.isBigIntType(type)) {
// BigInt

@@ -167,0 +167,0 @@ return visitBigInt(visitorContext);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ts = require("typescript");
const tsutils = require("tsutils");
const tsutils = require("tsutils/typeguard/3.0");
const VisitorUtils = require("./visitor-utils");

@@ -320,3 +320,3 @@ const VisitorKeyof = require("./visitor-keyof");

}
else if ((ts.TypeFlags.BigInt & type.flags) !== 0) {
else if (VisitorUtils.isBigIntType(type)) {
// BigInt

@@ -323,0 +323,0 @@ return visitBigInt(visitorContext);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ts = require("typescript");
const tsutils = require("tsutils");
const tsutils = require("tsutils/typeguard/3.0");
const VisitorUtils = require("./visitor-utils");

@@ -95,3 +95,3 @@ const VisitorKeyof = require("./visitor-keyof");

}
else if ((ts.TypeFlags.BigInt & type.flags) !== 0) {
else if (VisitorUtils.isBigIntType(type)) {
name = VisitorUtils.getBigintFunction(visitorContext);

@@ -98,0 +98,0 @@ }

@@ -33,1 +33,2 @@ import * as ts from 'typescript';

export declare function createSuperfluousPropertiesLoop(propertyNames: string[]): ts.ForOfStatement;
export declare function isBigIntType(type: ts.Type): number | false;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ts = require("typescript");
const tsutils = require("tsutils");
const tsutils = require("tsutils/typeguard/3.0");
exports.objectIdentifier = ts.createIdentifier('object');

@@ -12,2 +12,5 @@ exports.pathIdentifier = ts.createIdentifier('path');

}
if ('isArrayLikeType' in visitorContext.checker && visitorContext.checker.isArrayLikeType(type)) {
return false;
}
let hasConstructSignatures = false;

@@ -19,3 +22,3 @@ if (type.symbol !== undefined && type.symbol.valueDeclaration !== undefined && ts.isVariableDeclaration(type.symbol.valueDeclaration) && type.symbol.valueDeclaration.type) {

}
if ((ts.ObjectFlags.Class & type.objectFlags) !== 0 || hasConstructSignatures) {
if (type.isClass() || hasConstructSignatures) {
if (visitorContext.options.ignoreClasses) {

@@ -298,2 +301,11 @@ return true;

exports.createSuperfluousPropertiesLoop = createSuperfluousPropertiesLoop;
function isBigIntType(type) {
if ('BigInt' in ts.TypeFlags) {
return ts.TypeFlags.BigInt & type.flags;
}
else {
return false;
}
}
exports.isBigIntType = isBigIntType;
//# sourceMappingURL=visitor-utils.js.map
{
"name": "typescript-is",
"version": "0.12.6",
"version": "0.13.0",
"engines": {

@@ -22,3 +22,3 @@ "node": ">=6.14.4"

"build": "rimraf lib/ && tsc --project tsconfig.json && copy-cli \"src/**/*.d.ts\" \"lib/\"",
"lint": "tslint src/**/*.ts test/**/*.ts",
"lint": "tslint \"src/**/*.ts\" \"test/**/*.ts\"",
"test": "npm run lint && npm run build && ttsc --project tsconfig-test.json && mocha"

@@ -38,3 +38,3 @@ },

"nested-error-stacks": "^2",
"tsutils": "^3.14.0"
"tsutils": "^3.17.1"
},

@@ -41,0 +41,0 @@ "optionalDependencies": {

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