Socket
Socket
Sign inDemoInstall

tsutils

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsutils - npm Package Compare versions

Comparing version 3.15.0 to 3.16.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 3.16.0
**Features:**
* added `getIteratorYieldResultFromIteratorResult` to extract the `yield`ed type from `IteratorResult<TYield, TReturn, TNext>`
# 3.15.0

@@ -2,0 +8,0 @@

2

package.json
{
"name": "tsutils",
"version": "3.15.0",
"version": "3.16.0",
"description": "utilities for working with typescript's AST",

@@ -5,0 +5,0 @@ "scripts": {

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

export declare function getInstanceTypeOfClassLikeDeclaration(node: ts.ClassLikeDeclaration, checker: ts.TypeChecker): ts.Type;
export declare function getIteratorYieldResultFromIteratorResult(type: ts.Type, node: ts.Node, checker: ts.TypeChecker): ts.Type;

@@ -231,1 +231,9 @@ "use strict";

exports.getInstanceTypeOfClassLikeDeclaration = getInstanceTypeOfClassLikeDeclaration;
function getIteratorYieldResultFromIteratorResult(type, node, checker) {
return type_1.isUnionType(type) && type.types.find((t) => {
const done = t.getProperty('done');
return done !== undefined &&
isBooleanLiteralType(removeOptionalityFromType(checker, checker.getTypeOfSymbolAtLocation(done, node)), false);
}) || type;
}
exports.getIteratorYieldResultFromIteratorResult = getIteratorYieldResultFromIteratorResult;
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