* Test update
* Use source file version as default signature for the file whenever there is no dts emit for the file
* json source files from project reference should be able to calculate the signature
* Dont emit declaration map when emitting dts files for force emit for signature
* Use ids as 1 based so we can specialize `0` to be some special meaning
* Baseline tsbuildinfo size in the readable baseline
* Baseline fileName and fileNames list as well in readable tsbuildinfo so that new additions are easy to recognize
* Finally add that missing relationship allowing a type to be assignable to both branches of a conditional
* Explicitly write out Ternary.Maybe
* Add slightly modified example from #25413
* fix sick sentence
* Loosen check to skip false branch constraint check to consider `infer` parameters as always satisfied in the extends clause
* Simplify things a bit, only instantiate once
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Fix property name bindings for class expr in loops
* Fix block-scope capturing with prop initializers
Co-authored-by: Joey Watts <joey.watts.96@gmail.com>
* Add a test for JSX namespace lookup with `jsx: preserve, jsxImportSource`
* updated baselines
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Accept generics for defineProperty
Both `Object.defineProperty()` and `Object.defineProperties()` return their
first argument. Use a generic so that typings can be passed through.
* Update baselines
* update missed baseline
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This was caused by the fact that getTypeWithFacts(resultType, TypeFacts.NEUndefinedOrNull) will return never both if resultType was already never and if resultType does not contain undefined or null. In the latter case returning the declaring type is correct, in the former case this causes something narrowed to never to still be typed as the original declared type.
Fixes#38070
When the originating definition was of the form
```js
module.exports.foo = expr
```
we were incorrectly trying to call `resolveName` on just the `foo` portion to get the "local" symbol, which simply failed to resolve (or would have resolved to the wrong thing), but for this form, the local symbol is just the containing property access expression
* Baseline readable buildinfo
* Use file names as index in file name list
This is extension of the idea given by @sokra to optimize size of tsbuildinfo
* Deduplicate reference map lists and use file name index to sort them
Different implementation of #43079 based on idea suggested by @sokra
* Minimal json.stringify for the tsbuildinfo
Again implementaion of suggestion by @sokra
* Update src/testRunner/unittests/tsbuild/helpers.ts
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
* Readable version of buildinfo all the time
* Some renames for readability as per feedback
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Previously, when getting jsdoc for signatures, the services layer would
get the jsdoc tags for the base symbol of a signature if it was
present. This is fine except when the base was overloaded. In that case,
the multiple signatures of the overload would all contribute jsdoc,
which is not correct.
A more correct fix would be to resolve overloads to the base, but
the compiler doesn't have this capability and adding it or jury-rigging
it seems like it would be complex, inappropriate for a fix to ship in a
patch version.
Co-authored-by: Orta Therox <git@orta.io>
Co-authored-by: Orta Therox <git@orta.io>
* fix receiver of imported and exported functions
fixes: #35420
* Rebase against master and clean up substitution flow
* Add evaluator tests
* Fix evaluator tests
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
* Initial implementation+first big transitions
* about 10 more
* Change baseline filename + more baselines
1. Use containing file name instead of first @Filename.
2. Switch the rest of the tests I need for @link over to baselines.
* fix lint
* Remove unused/incorrectly named fourslash baselines
* fix incorrectly updated baselines
* dedupe non-unique filenames
* Add names to marker baselines
Also rename another duped test filename.
* Fix semicolon lint