33050 Commits

Author SHA1 Message Date
Anders Hejlsberg
367ef6d3c4 Fix tracing id 2022-03-07 10:23:28 -08:00
Anders Hejlsberg
08c0fa9acd Limit structural traversal to only types containing marker types 2022-03-07 09:40:32 -08:00
Anders Hejlsberg
a3230370dd Accept new baselines 2022-03-06 12:12:58 -08:00
Anders Hejlsberg
466bcb2b93 Always fully compute variances structurally 2022-03-06 12:12:38 -08:00
Anders Hejlsberg
d059791728 Track if incomplete variances have been observed 2022-03-01 17:02:58 -08:00
Anders Hejlsberg
de4a166905 Add tests 2022-03-01 14:55:42 -08:00
Anders Hejlsberg
fc15aa2bf0 Only permanently record non-nested getVariancesWorker results 2022-03-01 14:54:51 -08:00
csigs
8f9b65318f
LEGO: Merge pull request 47985
LEGO: Merge pull request 47985
2022-02-21 02:54:45 -08:00
csigs
a7548745d7
LEGO: Merge pull request 47973
LEGO: Merge pull request 47973
2022-02-20 02:50:12 -08:00
TypeScript Bot
9636585452 Update package-lock.json 2022-02-20 06:06:19 +00:00
csigs
1ad569fa3d
LEGO: Merge pull request 47967
LEGO: Merge pull request 47967
2022-02-19 03:09:46 -08:00
Nathan Shively-Sanders
5150682a58
Only suggest @param codefixes in TS (#47959)
* Only issue @param suggestions with codefixes in TS

Previously, there were 2 JS errors that were issued as suggestions in TS
files. But there was no codefix for these errors, and the errors were
incorrect in TS.

This PR only issues the JS-specific errors on JS files.

* Minimise test
2022-02-18 15:58:09 -08:00
Oleksandr T
acfdd1bd4d
update baseline (#47960) 2022-02-18 14:48:09 -08:00
Oleksandr T
b0b8cdafc9
feat(44956): remove hyphen separator (#47777) 2022-02-18 13:41:36 -08:00
Nathan Shively-Sanders
2477ff915e
Fix object.assign first param constraint (#40909)
* fixes #35621

* undo changes to generated file

* undo whitespace fixup attempt

* update baselines

Co-authored-by: TrejGun <trejgun@gmail.com>
2022-02-18 13:30:07 -08:00
Josh Goldberg
92204983f4
Standardized aka.ms links for tsc and tsconfig (#47129)
* Standardized aka.ms links for tsc and tsconfig

* Three missed baselines

* Three last baselines

* Went back to aka.ms/tsconfig
2022-02-18 12:09:15 -08:00
Anders Hejlsberg
db226a80e8
Remove unnecessary check in getNarrowableTypeForReference (#47953)
* Remove unnecessary check in getNarrowableTypeForReference

* Add regression test
2022-02-18 11:03:48 -08:00
csigs
ddf17e0a76
LEGO: Merge pull request 47948
LEGO: Merge pull request 47948
2022-02-18 02:49:24 -08:00
islandryu
b8b1201e44
fix(47024):fix type of DateTimeFormat and NumberFormat (#47117)
* fix type of DateTimeFormat and NumberFormat

* add NumberFormat to esnext.intl.d.ts

* Update src/lib/esnext.intl.d.ts

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* better unification of previous changes

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-02-17 15:37:43 -08:00
Oleksandr T
51d34466e7
feat(47281): use unknown type instead of any (#47308) 2022-02-17 13:54:02 -08:00
Matt Bierner
55e2e15aa3
Use webworker typings for webServer (#46944)
Updates `webServer.ts` to include the webworker typings. This means we don't have to redeclare the web globals we use in this file
2022-02-17 13:18:20 -08:00
DetachHead
092018bd7e
fix issue where duplicate default exports aren't detected (#46871)
* fix issue where duplicate default exports aren't detected when there's an interface

* accept baseline change

* add `exportDefaultInterfaceClassAndValue` test

* add more tests for multiple default exports

* add two interfaces test

Co-authored-by: DetachHead <detachhead@users.noreply.github.com>
2022-02-17 13:17:31 -08:00
Jonas Hübotter
fb1066e5d9
Uncalled function checks only works with single conditional (#42835)
* Uncalled function checks only works with single conditional

* fix type errors in compiler

* remove uncalled function checks with negations

* review

* fix test

* Cleanup after merge, accept baselines

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-02-17 11:37:55 -08:00
Anders Hejlsberg
53809d8ed1
Remove unnecessary check for misaligned complex rest parameters (#47934)
* Remove unnecessary check for misaligned complex rest parameters

* Add tests
2022-02-17 11:35:52 -08:00
Oleksandr T
1c06ef38b8
fix(47391): omit | token from jsdoc linkTag text (#47575) 2022-02-17 11:35:09 -08:00
Oleksandr T
5b947e6526
feat(47619): add support for extracting jsx string literal attribute to a constant (#47624) 2022-02-17 11:30:52 -08:00
webstrand
66dba1331b
Fix #38482 making ThisParameterType<T> more general (#47162)
`ThisParameterType<(...args: X) => void>` expands to
`(...args: X) => void extends (this: infer U, ...args: any[]) => any`.
When `X` is an unresolved type parameter it is not possible to determine
that `any[]` is assignable to `X`. However `never` is always assignable
to `X`, so we use that instead.
2022-02-17 11:28:22 -08:00
csigs
5c2272949a
LEGO: Merge pull request 47930
LEGO: Merge pull request 47930
2022-02-17 02:53:14 -08:00
Oleksandr T
03a4df7a57
fix(47820): forbid extraction jsdoc (#47830) 2022-02-16 16:38:11 -08:00
Anders Hejlsberg
5afbfbcbd0
Instantiation expressions (#47607)
* Permit type arguments in references to generic functions

* Accept new baselines

* Delete pointless fourslash test

* Fix lint issue

* Finalize implementation

* Add tests

* Accept new baselines

* Properly handle instantiation of instantiation expression types

* Accept new API baselines

* Fix lint error

* Add more tests

* Properly handle unions/intersections of generic types

* Add more tests

* More permissive parsing of type arguments in member expressions

* Update tests

* Accept new baselines
2022-02-16 13:27:16 -08:00
Oleksandr T
b9a06e515f
fix(47261): allow linkcode/linkplain tags in see tag (#47403) 2022-02-15 17:20:51 -08:00
Oleksandr T
a0bab5de5c
fix(47256): show deprecated on index signatures (#47400) 2022-02-15 17:13:04 -08:00
Oleksandr T
39fe0318e0
feat(47223): show completion in jsdoc template tag (#47317) 2022-02-15 16:59:37 -08:00
Oleksandr T
063eaa70e6
feat(47595): allow using private fields in type queries (#47696) 2022-02-15 15:48:10 -08:00
swandir
3b95404f59
Make Intl.Locale baseName and language properties required (#47720) 2022-02-15 15:26:25 -08:00
Zzzen
81d1457738
mark length of readonly tuple as readonly (#47717) 2022-02-15 15:02:36 -08:00
Gabriela Araujo Britto
d0e1255d18
Merge InlayHintOptions into UserPreferences (#47729)
* get rid of inlayhintoptions

* update userpreferences in protocol
2022-02-15 14:56:16 -08:00
Vritant Bhardwaj
0798faf596
Add support for formatRange to Intl.DateTimeFormat (#47740)
* add interface for DateTimeFormat.format

* remove railing whitespace
2022-02-15 14:53:44 -08:00
Jihn Dai
1e60c8702c
Fix inference for generic-typed constructor parameter when no explicit constructor is present (#47750)
* assume signature is from constructor if declaration is undefined

* add tests and baselines
2022-02-15 14:21:44 -08:00
Wesley Wigham
67172e41c2
Triple-slash reference type directives can override the import mode used for their resolution (#47732)
* Triple-slash reference type directives can override the import mode used for their resolution

They now use the file's default mode by default, rather than always using commonjs. The new arguments to the
reference directive look like:

```ts
///<reference types="pkg" resolution-mode="require" />
```

or

```ts
///<reference types="pkg" resolution-mode="import" />
```

* Omit redundant import modes in emitter

* Add test for #47806

* Add server test for triple-slash reference mode overrides

* Move FileReference mode into helper

* Update tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride3.ts

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-02-15 13:53:11 -08:00
Oleksandr T
1b1530ae52
fix(47713): allow JSDoc tags on CaseClause nodes (#47741) 2022-02-15 13:27:54 -08:00
Gabriela Araujo Britto
67f47bf420
Fix incorrect rest element type inside contextually typed parameter (#47909)
* wip: possible fixes

* pass parameter type to assignBindingElementTypes

* undo unnecessary changes

* update baselines
2022-02-15 13:27:23 -08:00
Felipe Armoni
d13af64bde
Fix 47746 - Missing properties quickfix does not handle generic parameters (#47790)
* Added test

* Added extra test case
2022-02-15 13:09:01 -08:00
Anders Hejlsberg
44e827bcc9
Eliminate redundant or meaningless elaborations in type relations (#47738)
* Eliminate redundant or meaningless elaborations in type relations

* Accept new baselines

* Add resetErrorInfo (though, oddly, shouldn't be necessary)

* Less aggressive reduction in second pass union/intersection checks

* Accept new baselines

* Restructure and back off a little bit more

* Only cache union/intersection relations once

* Accept new baselines

* Properly cache identity relations, clean up error reporting

* Move more logic to cached side of relation checks

* Optimize and remove more redundant elaborations

* Accept new baselines

* Remove unnecessary error state capture

* More optimizing

* Cache isWeakType computation

* Revert "Cache isWeakType computation"

This reverts commit 25a71c4de61f6366ffac080d19685dcb200f42b9.

* Address CR feedback

* Accept new baselines
2022-02-15 18:30:29 +00: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