Skip to content

Releases: ajafff/tsutils

v3.14.0

03 Jun 18:21
Compare
Choose a tag to compare

Features:

  • added getInstanceTypeOfClassLikeDeclaration and getConstructorTypeOfClassLikeDeclaration
  • added AccessKind.Delete to getAccessKind: getAccessKind(node) & AccessKind.Modification can now be used to restore the old behavior of isReassignmentTarget(node)

v3.13.0

01 Jun 13:57
Compare
Choose a tag to compare

Features:

  • getAccessKind determines whether an expression is read from, written to or both
  • optimized getPropertyOfType for unambiguous property names to partially work around microsoft/TypeScript#31565

Bugfixes:

  • isReassignmentTarget no longer returns true for DeleteExpression as it doesn't assign a value to the operand

v3.12.0

29 May 16:40
Compare
Choose a tag to compare

Features:

  • getLateBoundPropertyNamesOfPropertyName returns all statically analyzable names of a property, method, ...
  • getSingleLateBoundPropertyNameOfPropertyName returns the literal name of a property, method, ... if statically analyzable

Bugfixes:

  • fixed circular import

v3.11.0

28 May 19:01
Compare
Choose a tag to compare

Features:

  • typeguards: isNumericOrStringLikeLiteral, isTupleTypeReference
  • intersectionTypeParts as counterpart to unionTypeParts
  • someTypePart to execute a callback for each union or intersection constituent until the callback returns true
  • getPropertyOfType looks up a property by its escaped name
  • isPropertyReadonlyInType determines whether a property in a given type cannot be written to
  • symbolHasReadonlyDeclaration determines if a Symbol has any readonly or constant declaration
  • isNumericPropertyName determines whether a property name would match an index signature
  • isBindableObjectDefinePropertyCall returns true for statically analyzable forms of Object.defineProperty(o, 'p', {value, writable})
  • isReadonlyAssignmentDeclaration determines whether an Object.defineProperty call is known to result in a readonly property
  • getLateBoundPropertyNames returns all known property names of an expression
  • getPropertyNameFromType extracts the property name of literal types
  • isWellKnownSymbolLiterally to recognize expressions in the form of Symbol.<name>
  • getPropertyNameOfWellKnownSymbol returns the escaped name for a well known symbol literal
  • unwrapParentheses returns the first child expression that is not a ParenthesizedExpression

v3.10.0

02 Apr 15:44
Compare
Choose a tag to compare

Features:

  • isCompilerOptionEnabled: incremental is implicitly enabled by composite

Bugfixes:

  • collectVariableUsage/getUsageDomain: no longer treat as const as type usage

v3.9.1

12 Mar 18:33
Compare
Choose a tag to compare

Bugfixes:

  • reverted invalid deprecation of canHaveJsdoc
  • fixed condition in parseJsdocOfNode

v3.9.0

10 Mar 20:58
Compare
Choose a tag to compare

Features:

  • added typeguards: isNullLiteral and isBooleanLiteral

v3.8.0

31 Jan 19:01
Compare
Choose a tag to compare

Features:

  • exposes typeguards for typescript@3.2 by default
  • added utilities: isConstAssertion and isInConstContext

v3.7.0

06 Jan 19:57
Compare
Choose a tag to compare

Features:

  • added isBlockScopedDeclarationStatement
  • added isInSingleStatementContext

v3.6.0

31 Dec 14:22
Compare
Choose a tag to compare

Features:

  • added getCheckJsDirective utility to parse // @ts-check and // @ts-nocheck pragmas