* `const` modifier on type parameters + revised contextual type logic
* Accept new baselines
* Fix modifier checking
* Add tests
* Cache isConstTypeVariable check
* Revert "Cache isConstTypeVariable check"
This reverts commit f8fd1fd29f.
* Fewer isConstTypeParameterContext checks
* Pay attention to cached `undefined` contextual type
* Allow `const` modifier in more places + properly print back
* Also permit `const` in method signature type parameters
* Fix parsing of `const` modifier in array expression type parameters
* Accept new baselines
* Remove unused properties from NodeLinks
* Rename `permitInvalidConstAsModifier` to `permitConstAsModifier`
* Add support for JSDocOverloadTag
* Use overload tag to determine function type
* Update baselines
* Add new tests along with baselines
* Add tests for all @overload tags in one comment
* Add tests for find-all-ref and rename operations
* Add tests for alternative uses of @overload tag
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Move .symbol to Declaration
* simplify some factories
* Move localSymbol to Declaration
* Ensure JSDocContainer types are properly initialized
* Move contextualType from Node to NodeLinks
* Move 'locals' and 'nextContainer' out of Node
* Move 'flowNode' out of 'Node'
* Pre-define endFlowNode/returnFlowNode
* Pre-define some SourceFile properties and a more stable cloneNode
* Don't add excess properties to type nodes in typeToTypeNode
* Refactor wrapSymbolTrackerToReportForContext to improve perf
* feat(49323): add support throws jsdoc tag
* change "name" to "typeExpression". parse "exception" as a synonym for "throws"
* include typeExpression from the throws tag in the quick info
* add JSDocThrowsTag to ForEachChildNodes
This adds a "small" d.ts bundler script. This script is very basic,
using Node printing to produce its output. Generally speaking, this is
inadvisable as it completely disregards name shadowing, globals, etc.
However, in our case, we don't care about the globals, and we can opt to
restructure our codebase in order to avoid conflict, which we largely
had to do anyway when we were namespaces and everything was in scope.
If these are regular comments, then they won't appear in our d.ts files.
But, now we are relying on an external d.ts bundler to produce our final
merged, so they need to be present in the "input" d.ts files, meaning
they have to be JSDoc comments.
These comments only work today because all of our builds load their TS
files from scratch, so they see the actual source files and their
non-JSDoc comments.
The comments also need to be attached to a declaration, not floating,
otherwise they won't be used by api-extractor, so move them if needed.
This step converts as many explicit accesses as possible in favor of direct imports from the modules in which things were declared. This restores the code (as much as possible) back to how it looked originally before the explicitify step, e.g. instead of "ts.Node" and "ts.Symbol", we have just "Node" and "Symbol".
This step converts each file into an exported module by hoisting the namespace bodies into the global scope and transferring internal markers down onto declarations as needed.
The namespaces are reconstructed as "barrel"-style modules, which are identical to the old namespace objects in structure. These reconstructed namespaces are then imported in the newly module-ified files, making existing expressions like "ts." valid.