Releases: ajafff/tsutils
Releases · ajafff/tsutils
v3.21.0
v3.20.0
Features:
findImports
andfindImportLikeNodes
take an additional parameterignoreFileName
. The default value for this paramter istrue
to remain backwards compatible. When set tofalse
, it matches the behavior of TypeScript, i.e. only looks forrequire
in JavaScript files.
Bugfixes:
getJsDoc
forEndOfFileToken
now returnsJSDoc
comments whose contents are usable with the type checker
v3.19.1
v3.19.0
Features:
getSymbolOfClassLikeDeclaration
to retrieve the symbol of class declarations and expressions regardless whether they have a name or notgetBaseOfClassLikeDeclaration
to conventiently get the expression afterextends
getBaseClassMemberOfClassElement
to look up the declaration of a class member in the base class
Bugfixes:
getConstructorTypeOfClassLikeDeclaration
now really returns the constructor type (the static side of the class), previously it returned the instance typehasExhaustiveCaseClauses
allows additional case clauses withnull
,undefined
andnever
v3.18.0
Features:
- Source maps for easier debugging
- JSDoc is preserved in declaration files
- Comments are presered in transpiled code
- Everything you need to handle the control flow changes of [email protected]
callExpressionAffectsControlFlow
to determine whether a CallExpression affects control flow by returningnever
orasserts
hasExhaustiveCaseClauses
to determine whether a SwitchStatement's CaseClauses handle every possible valueendsControlFlow
andgetControlFlowEnd
take an optionalchecker
parameter to recognize exhaustive SwitchStatements and control flow effects of CallExpressions
formatPseudoBigInt
converts TypeScript's representation of a BigInt to its literal representation as you would write it in your source codegetAstNodeAtPosition
similar togetTokenAtPosition
, but only operates on AST NodesremoveOptionalChainingUndefinedMarkerType
andisOptionalChainingUndefinedMarkerType
to handle types originating in an optional chainfindImports
andfindImportLikeNodes
: prepare for import assertionsgetTsCheckDirective
as new name forgetCheckJsDirective
getCheckJsDirective
is now deprecated
Bugfixes:
getUsageDomain
: handles NamespaceExport and NamedTupleMembergetPropertyName
: handles parentheses and negative numeric literals, excludes RegExp literals and private identifiersgetSingleLateBoundPropertyNameOfPropertyName
andgetLateBoundPropertyNamesOfPropertyName
: handles private identifiershasAccessModifier
: handles JSDoc access modifierhasSideEffects
: correctly determines side effects of (static) property initializersisExpressionValueUsed
: handle nullish coalescing and conditional assignment operatorscanHaveJsDoc
: aligned with upstream changes in TypeScriptisCompilerOptionEnabled
:noUncheckedIndexedAccess
requiresstrictNullChecks
checkJs
impliesallowJs
emitDeclarationOnly
requiresdeclaration
isInConstContext
: handle template string interpolations- excluded unnecessary files from npm package