Anders Hejlsberg
c472ba5087
Accept new baselines
2022-02-15 07:39:52 +01:00
Anders Hejlsberg
28439f7028
Merge branch 'main' into fix47668
...
# Conflicts:
# src/compiler/diagnosticMessages.json
2022-02-15 07:39:45 +01:00
TypeScript Bot
c3a0552033
Update package-lock.json
2022-02-15 06:07:13 +00:00
Wesley Wigham
e32281cc02
Allow extensionless mains for cjs mode packages even from an esm import ( #47893 )
2022-02-14 14:13:21 -08:00
Andrew Branch
03f9035029
[GH Actions] Implicitly use AUTHORIZATION header instead of PAT-in-URL ( #47894 )
...
* Implicitly use AUTHORIZATION header instead of PAT-in-URL
* Does just GITHUB_TOKEN work?
* Try unsetting extraheader config
* Do config inside repos
2022-02-14 12:40:07 -08:00
Wesley Wigham
7e57c81802
Explicitly annotate return type of getCommentRange ( #47860 )
2022-02-14 09:21:43 -08:00
csigs
67d433893d
LEGO: Merge pull request 47875
...
LEGO: Merge pull request 47875
2022-02-14 02:49:40 -08:00
csigs
39d9e69736
LEGO: Merge pull request 47871
...
LEGO: Merge pull request 47871
2022-02-13 02:49:51 -08:00
Anders Hejlsberg
78ef3e70c9
Ensure empty array literal is assignable to never[] ( #47816 )
...
* Ensure empty array literal is assignable to never[]
* Add tests
* Add comment
2022-02-12 16:39:21 +01:00
csigs
2bdbc8fe7b
LEGO: Merge pull request 47861
...
LEGO: Merge pull request 47861
2022-02-12 03:19:41 -08:00
TypeScript Bot
77d24f93fb
Update package-lock.json
2022-02-12 06:06:16 +00:00
Daniel Rosenwasser
67d376c882
Update version to 4.7 and update baselines. ( #47856 )
2022-02-11 16:18:55 -08:00
Wesley Wigham
1bdb0d90bf
ESM mode nonrelative imports should assume index.js entrypoints even if no package main is present ( #47854 )
2022-02-11 15:44:11 -08:00
Wesley Wigham
e204acfa26
Ensure subtype relation ordering for readonly properties ( #47069 )
...
* Ensure subtype relation ordering for readonly properties
* Probably fix post-LKG assignability error
2022-02-11 14:59:01 -08:00
Wesley Wigham
033f9e0081
Consider a symbol visible for declaration emit when it is the target of an ambient module's export= ( #47835 )
...
* Consider a symbol visible for declaration emit when it is the target of an ambient module's export=
* Just use resolveExternalModuleSymbol
2022-02-11 14:58:31 -08:00
Andrew Branch
7f022c58fb
Correctly resolve imports ending with "." and ".." ( #47850 )
2022-02-11 11:14:07 -08:00
Oleksandr T
73506f3512
fix(46803): remove unused react imports with enabled react-jsxdev, react-jsx ( #47247 )
2022-02-11 11:13:26 -08:00
Wesley Wigham
4c80036b7d
Enable path completions for node12/nodenext ( #47836 )
...
* Enable path completions for node12/nodenext
* Explicitly pull path completions from export maps when available
* Explicitly handle pattern exports by stopping up to the star
2022-02-11 10:54:04 -08:00
csigs
3945e5cbaf
LEGO: Merge pull request 47843
...
LEGO: Merge pull request 47843
2022-02-11 03:00:55 -08:00
TypeScript Bot
2bd91a6e3a
Update package-lock.json
2022-02-11 06:06:18 +00:00
Andrew Branch
0655f32e05
Add missing isolatedModules error for export import ( #47838 )
...
* Add missing isolatedModules error for `export import`
* Update existing baseline
2022-02-10 16:13:04 -08:00
Andrew Branch
954d0442eb
Avoid auto-importing from barrel re-exporting index files that are likely to make an import cycle ( #47516 )
...
* Avoid auto-importing from barrel re-exporting index files that are likely to make an import cycle
* Finish fixing merge conflict
2022-02-10 15:05:08 -08:00
Oleksandr T
b456702755
feat(11378): check param names in JSDoc ( #47257 )
2022-02-10 10:02:07 -08:00
Oleksandr T
954ce5b278
fix(46611): allow to use jsdoc type on class methods ( #46688 )
2022-02-10 09:17:30 -08:00
TypeScript Bot
df673f74f5
Update package-lock.json
2022-02-10 06:07:00 +00:00
Nathan Shively-Sanders
42aa18bf44
mergeSymbol in checker:Remove block-scoped duplicate declaration errors in plain JS ( #47825 )
...
* Checker:Remove block-scoped duplicate declaration errors in plain JS
Previously they were issued in mergeSymbol, not they are not issued.
* fix semicolon lint
2022-02-09 16:26:27 -08:00
islandryu
95c22d1750
fix(47076):Fix error term of declaration in modules ( #47087 )
...
* Fix error term of declaration in modules
* fix test
* change error code of "An import declaration can only be used at the top level of a module."
* Separate js and ts files for export errors in module.
* Change non-top-level error in namespace
* format
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com >
2022-02-09 13:19:30 -08:00
Gabriela Araujo Britto
2d0a00d457
Fix destructuring and narrowing interaction ( #47337 )
...
* WIP: pass in checkmode to getNarrowableTypeForReference
* add tests
* another pass through new check mode argument
* rename new check mode
* only use rest flag for rest elements in objects
* add and update tests
* change check mode flag name
* restore package-lock.json
* fix comments
* get rid of fourslash tests
* fix caching in checkExpressionCached when checkMode is not normal
* Don't distinguish between object and array rest elements
* get rid of undefined check mode
* don't make includeOptionality into checkmode flag
2022-02-09 12:25:07 -08:00
Nathan Shively-Sanders
d5c3015516
Constructor function methods:Add two missing tag lookups ( #47742 )
...
1. During name resolution, `@param` and `@return` tags should walk up
through the jsdoc comment and then jump to the host function. Previously they
did not, which would cause them to not resolve type parameters bound in
the scope of a host that was not a sibling of the comment. The example
from #46618 is a prototype method:
```js
/**
* @template {T}
* @param {T} t
*/
C.prototype.m = function (t) {
}
```
2. During name resolution, prototype methods are supposed to resolve
types both from the host function's location and from the containing
class' location. The containing class lookup happens in a separate call
to `resolveName`. Previously, the code that finds the containing class
only worked for the above style of comment, which is on the outer
ExpressionStatement, but not for the below style, which is on the
function expression itself:
```js
C.prototype.m =
/**
* @template {T}
* @param {T} t
*/
function (t) {
}
```
2022-02-09 11:22:33 -08:00
Andrew Branch
2cf5afd49e
Avoid pulling on setter type when only getter type is needed to break circularity ( #47818 )
2022-02-09 10:56:29 -08:00
Anders Hejlsberg
1d70b01236
Address CR feedback
2022-02-09 16:55:47 +01:00
Anders Hejlsberg
c427a46aff
Revert "Cache isWeakType computation"
...
This reverts commit 25a71c4de6 .
2022-02-09 16:28:54 +01:00
Oleksandr T
c06849ad16
fix(47787): show QF to delete parameter in getter ( #47797 )
2022-02-08 13:39:54 -08:00
Andrew Branch
c5b1011e94
Compute writeType from set accessors for union and intersection properties ( #47674 )
...
* Compute write type from set accessors for union and intersection properties
* Add test for deferred writeType
* Always check for writeType of symbol
2022-02-08 12:57:34 -08:00
Oleksandr T
17b97ccc43
fix(47788): forbid convertToMappedObjectType QF in invalid index signatures ( #47798 )
2022-02-08 11:36:45 -08:00
Anders Hejlsberg
25a71c4de6
Cache isWeakType computation
2022-02-08 10:43:17 -05:00
Anders Hejlsberg
530c8765d5
More optimizing
2022-02-08 10:09:28 -05:00
csigs
460908a478
LEGO: Merge pull request 47801
...
LEGO: Merge pull request 47801
2022-02-08 03:23:26 -08:00
TypeScript Bot
5b53e4ec28
Update package-lock.json
2022-02-08 06:08:53 +00:00
Andrew Casey
c216b2db5b
Trace document registry operations ( #47785 )
...
...to help detect misconfigurations like #47687 .
2022-02-07 16:10:38 -08:00
Andrew Casey
1b6fb99efe
Log per-project FAR and update baselines ( #47781 )
2022-02-07 16:10:01 -08:00
Andrew Branch
d8ac54bfb1
Fix substitution types of indexed access types of substitution types ( #47791 )
...
* Fix substitution types of indexed access types of substitution types
* Add tests
* Fix accidental unindentation
2022-02-07 15:53:13 -08:00
Oleksandr T
867470ca26
fix(47783): show globals completion in case keyword outside of switch statement ( #47786 )
2022-02-07 14:08:35 -08:00
Oleksandr T
afeacf41bd
fix(47782): forbid super() extraction outside this container ( #47784 )
2022-02-07 13:26:39 -08:00
Anders Hejlsberg
1c69acb43d
Remove unnecessary error state capture
2022-02-07 16:05:06 -05:00
Anders Hejlsberg
16b986bd5f
Accept new baselines
2022-02-07 15:00:21 -05:00
Anders Hejlsberg
adb37a5abb
Optimize and remove more redundant elaborations
2022-02-07 15:00:13 -05:00
Anders Hejlsberg
2670b26187
Move more logic to cached side of relation checks
2022-02-07 10:17:31 -05:00
csigs
14feed97a0
LEGO: Merge pull request 47761
...
LEGO: Merge pull request 47761
2022-02-07 02:50:24 -08:00
Anders Hejlsberg
4866ce562d
Properly cache identity relations, clean up error reporting
2022-02-06 10:37:21 -08:00