Releases: ajafff/tsutils
Releases · ajafff/tsutils
v3.21.0
v3.20.0
Features:
findImportsandfindImportLikeNodestake an additional parameterignoreFileName. The default value for this paramter istrueto remain backwards compatible. When set tofalse, it matches the behavior of TypeScript, i.e. only looks forrequirein JavaScript files.
Bugfixes:
getJsDocforEndOfFileTokennow returnsJSDoccomments whose contents are usable with the type checker
v3.19.1
v3.19.0
Features:
getSymbolOfClassLikeDeclarationto retrieve the symbol of class declarations and expressions regardless whether they have a name or notgetBaseOfClassLikeDeclarationto conventiently get the expression afterextendsgetBaseClassMemberOfClassElementto look up the declaration of a class member in the base class
Bugfixes:
getConstructorTypeOfClassLikeDeclarationnow really returns the constructor type (the static side of the class), previously it returned the instance typehasExhaustiveCaseClausesallows additional case clauses withnull,undefinedandnever
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]
callExpressionAffectsControlFlowto determine whether a CallExpression affects control flow by returningneverorassertshasExhaustiveCaseClausesto determine whether a SwitchStatement's CaseClauses handle every possible valueendsControlFlowandgetControlFlowEndtake an optionalcheckerparameter to recognize exhaustive SwitchStatements and control flow effects of CallExpressions
formatPseudoBigIntconverts TypeScript's representation of a BigInt to its literal representation as you would write it in your source codegetAstNodeAtPositionsimilar togetTokenAtPosition, but only operates on AST NodesremoveOptionalChainingUndefinedMarkerTypeandisOptionalChainingUndefinedMarkerTypeto handle types originating in an optional chainfindImportsandfindImportLikeNodes: prepare for import assertionsgetTsCheckDirectiveas new name forgetCheckJsDirectivegetCheckJsDirectiveis now deprecated
Bugfixes:
getUsageDomain: handles NamespaceExport and NamedTupleMembergetPropertyName: handles parentheses and negative numeric literals, excludes RegExp literals and private identifiersgetSingleLateBoundPropertyNameOfPropertyNameandgetLateBoundPropertyNamesOfPropertyName: 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:noUncheckedIndexedAccessrequiresstrictNullCheckscheckJsimpliesallowJsemitDeclarationOnlyrequiresdeclaration
isInConstContext: handle template string interpolations- excluded unnecessary files from npm package