* Simplify getVariancesWorker and associated logic
* Accept new API baselines
* Add 'in' and 'out' modififers / add modifiers to type parameters
* Check variance annotations
* Update test runner
* Accept new API baselines
* Allow variance annotations only on certain type parameters
* Add deprecated implementation of createTypeParameterDeclaration
* Accept new API baselines
* Report variance markers as 'sub-XXX' and 'super-XXX'
* Add tests
* Accept new baselines
* Trace project creation, loading, and updateGraph
* Drop generic event tracing
* Make argument names more consistent
* Trace diagnostics to make steps easier to interpret
* Fill an unexplained gap in updateGraph
* Move updateGraph tracing into base type
* Fill the gaps in updateGraph
* Add isolatedModules error for ambiguous imports referenced in decorator metadata
* Improve test and accept baselines
* Error only for es2015+
* Add namespace import to error message as workaround
* Add codefix
* Fix merge fallout
* Handle JS synthetic rest args in contextual parameter assignment
* Limit fixing to only unannotated js rest parameters
* Minimize test
* Add annotated version
* Remove explicit CheckFlags.RestParameter check since apparently not all rest parameters are CheckFlags.RestParameter
* Add moduleDetection compiler flag to allow for changing how modules are parsed
The default setting is 'auto', where JSX containing files under react-jsx and react-jsxdev are
always parsed as modules, and esm-format files under module: node12+ are always parsed as modules,
in addition to the 'legacy' detection mode's conditions for other files. (Declaration files are exempt from
these new conditions)
The 'legacy' mode preserves TS's behavior prior to the introduction of this flag - a file is
parsed as a module if it contains an import, export, or import.meta expression.
In addition, there is a 'force' mode that forces all non-declaration files to be parsed as modules.
(Declaration files are still only modules if they contain a top-level import or export.)
This technically breaks the parser API, but it's kinda-sorta backwards compatible so long
as you don't need the functionality associated with more recent compiler flags.
* Fix post-merge lint
* Rename function
* Update default value documentation
* PR feedback
* Fix lint and typo
* Fix conditional type type parameter leak
* Monkey with comment text per code review
* Conditionally clone type param
* Reuse input array and avoid making mapper where possible
* Rename SyntaxKind.JSDocComment -> JSDoc
Early on, I made the mistake of using the syntax kind JSDocComment for
the type JSDoc. This arose because
I hadn't decided on the terminology of "jsdoc" for the C-style comment
that is attached to a declaration. "comment"
for the text that follows a tag. By the time I settled on those terms
consistently, a version had already shipped with `interface JSDoc`
having `SyntaxKind.JSDocComment`.
However, there is now a `type JSDocComment` that represents the possible
contents of the comment text (strings and various kinds of `@link`), so
it's doubly confusing that this type has a union of four kinds instead
of SyntaxKind.JSDocComment.
Although this is a public API break, I don't think it's hard to recover
from, and the JSDoc API has accessors for individual tag types, so I
suspect few people refer directly to SyntaxKind.JSDocComment.
* Add deprecate JSDocComment alias to JSDoc
For backward compatibility
* Make JSDoc an alias of JSDocComment
Improves output of JSDocParsing tests without having to make its code
smarter.
* update API baselines
* fix this type validations for protected fields
* update previous baselines
* add new tests and baselines
* ClassOrInterface can be returned as enclosingClass
* inline function code and remove unnecessary blank lines
* refactor enclosingClass checks
In short, the fix I submitted looked at the union ofproperties, but it
really should have looked at the intersection.
Two sytlistic notes. I couldn't find the best way to get the unique
strings of an array like `[...new Set()]` would, so I created a small
helper function, but didn't put it in a great place. Also, before the
second concatenated array of discriminators at least matched the first
in complexity, but now it's much worse. I don't think that section is
particularly easy to read, but I also don't see a significantly reusable
part.
fixes#41759
* Add import assertions for type-only imports and import types to change resolver modes
* By popular request, only allow mode assertions on top-level type only imports
* Add specifier options parameter to specifier generation
* Use full `isReadonlySymbol` check rather than declaration flags
* Limit subtype readonly consistency check to strict subtype relation
* Update comment
* add Intl.Locale param type to locales argument in BigInt, Number, and Date methods
* update baselines
* add test for locales object arguments
* fix indentation