4428 Commits

Author SHA1 Message Date
Gabriela Araujo Britto
d2ad3ca035
Improve diagnostics deduplication 2 (#58318) 2024-04-29 10:24:22 -07:00
Gabriela Araujo Britto
ebcb09d71a
Improve diagnostics deduplication (#58220) 2024-04-26 15:44:09 -07:00
Wesley Wigham
f76727d17a
Add noCheck API option (#57934) 2024-04-26 13:21:15 -07:00
Daniel Rosenwasser
ed87791dd9
Rephrase error messages on backrererences. (#58310) 2024-04-24 21:59:53 -07:00
Oleksandr T
501fa6e4e4
fix(58265): JSDoc comment string with the keyword "@private" before import statement in JS file result in cryptic error TS1191 during compilation (#58297) 2024-04-24 21:18:31 -07:00
Wesley Wigham
e6ba82b346
Error on references to literal enum members in conditions (#58264) 2024-04-24 10:32:53 -07:00
形素叢集・ぐらふぃーむ
42f238bfbb
Provide Syntax Checking for Regular Expressions (#55600)
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
2024-04-19 16:51:08 -07:00
Jean
8e8c1b6a64
Fix bug#56997 - Parenthesized SatisfiesExpressions with comments are not unwrapped consistently in emitted JS (#57281)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
2024-04-19 16:00:44 -07:00
Titian Cernicova-Dragomir
e62418e868
Isolated declarations errors (#58201)
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
2024-04-19 15:37:15 -07:00
Ryan Cavanaugh
aedd1b1bb5
Correctly compute noUncheckedIndexedAccess effects on compound/increment/decrement assignments (#58239) 2024-04-19 14:13:54 -07:00
Jake Bailey
21f5f394b9
Add test for type inference of Promise/PromiseLike union bug (#58213) 2024-04-19 13:51:19 -07:00
Mateusz Burzyński
e0755dc7c1
Fixed single signature type parameter leak (#58008)
Co-authored-by: Wesley Wigham <wewigham@microsoft.com>
2024-04-19 10:15:42 -07:00
Wesley Wigham
48870169dc
Check nearest package.json dependencies for possible package names for specifier candidates (#58176) 2024-04-18 17:43:08 -07:00
Jake Bailey
0dd12da165
Error on replacement character only in top-level scanning (#58227) 2024-04-17 11:34:00 -07:00
Mateusz Burzyński
fb1b26cc68
Propagate object flags related to object and array literals onto module.exports types (#57467) 2024-04-16 11:21:01 -07:00
Gabriela Araujo Britto
fd238857b4
Avoid infinite recursion with inferReverseMappedType (#57837) 2024-04-16 10:43:39 -07:00
Mateusz Burzyński
be1f89271c
Fix declaration emit of divergent accessors in JS classes (#58172) 2024-04-15 16:48:04 -07:00
Wesley Wigham
a9b0d1ee53
Use better context scope for class constructor implementation signatures (#58168) 2024-04-12 12:52:14 -07:00
Andrew Branch
585a9af830
Respect package.json "type" and module-format-specific file extensions in more module modes (#57896) 2024-04-12 12:47:09 -07:00
Wesley Wigham
6092c2d4c4
Add missing recursive vistor on copied import type nodes (#58165) 2024-04-12 10:53:57 -07:00
Andrew Branch
2b038ff64a
Fix self tail call return type inference in assigned anonymous functions (#58124) 2024-04-10 12:51:34 -07:00
Anders Hejlsberg
066773b99b
Fix constraints of nested homomorphic mapped type instantiations (#58098) 2024-04-08 16:02:14 -07:00
Zzzen
f608fc0a10
check return type of this type predicates (#57341) 2024-04-08 13:37:24 -07:00
Mateusz Burzyński
9ba0800646
Fixed braceless type tags with types starting with an open parenthesis (#57167)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2024-04-05 15:38:53 -07:00
Andrew Branch
9f8a231270
Use evaluator for isolatedModules enum restrictions (#57966) 2024-04-04 09:56:23 -07:00
Wesley Wigham
82897a0c9c
Node builder scope traversal improvements (#58063)
Co-authored-by: Titian Cernicova-Dragomir <tcernicovad1@bloomberg.net>
2024-04-03 14:21:12 -07:00
Mateusz Burzyński
42a215c8fb
Fixed type predicate inference for discriminated union parameters (#57952) 2024-04-02 11:49:21 -07:00
Mateusz Burzyński
520772e54e
Fixed excess and common property checks with NoInfer (#57673) 2024-04-02 08:02:52 -07:00
Anders Hejlsberg
e418f8d12c
Improve optionality detection in mapped type indexed access substitutions (#57946) 2024-03-27 15:52:26 -07:00
Neil Bryson
32a1370fa8
Add missing parameters from Array.toLocaleString on ES2015 libs (#57679) 2024-03-27 10:38:11 -07:00
Wesley Wigham
e1874f3ffe
Propagate outer type parameters of single signature types (#57403) 2024-03-27 09:57:09 -07:00
Mateusz Burzyński
0e0975d1cf
Add extra tests for inference with any co-inference with a different contra-inference (#57917) 2024-03-25 13:08:12 -07:00
Ron Buckton
64a00106a8
Limit decorator use-before-def check to ES decorators only (#57933) 2024-03-25 14:31:17 -04:00
Wesley Wigham
91cecdc109
Lookup retained type nodes in the node builder using correct, specific SymbolFlags meaning (#57887) 2024-03-21 11:47:56 -07:00
Anders Hejlsberg
ecb6eb2354
Divide-and-conquer strategy for intersections of unions (#57871) 2024-03-21 10:18:50 -07:00
Jake Bailey
7d504551ae
Do not perserve references in declaration emit, unless preserve=true (#57681) 2024-03-20 15:06:02 -07:00
Jan Kühle
f70b068b3c
isolatedModules errors for non-literal enum initializers (#56736) 2024-03-20 09:50:53 -07:00
Isabel Duan
3282ff28e6
add Array.fromAsync to esnext (#57748)
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2024-03-19 10:43:02 -07:00
Wesley Wigham
66047f79dc
Look for usable type nodes in associated expressions for declaration emit (#57772) 2024-03-18 13:19:55 -07:00
Anders Hejlsberg
37fa47e2e5
Distribute mapped types over array/tuple intersections (#57801) 2024-03-18 10:07:43 -07:00
Jake Bailey
756c0c3aa2
Use noTypesAndSymbols for API tests (#57799) 2024-03-15 18:39:45 -07:00
Gabriela Araujo Britto
b009837298
Revert "Allow (non-assert) type predicates to narrow by discriminant" (#57750) 2024-03-15 11:59:09 -07:00
Dan Vanderkam
e5bf594753
Infer type predicates from function bodies using control flow analysis (#57465)
Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
2024-03-15 11:42:55 -07:00
Anders Hejlsberg
952dfc5082
Exclude generic string-like types from intersection reduction (#57751) 2024-03-13 16:13:31 -07:00
Andrew Branch
f9ef9439bd
Ensure enum members syntactically determinable to be strings do not get reverse mappings (#57686)
Co-authored-by: frigus02 <3579251+frigus02@users.noreply.github.com>
Co-authored-by: Jan Kühle <jkuehle90@gmail.com>
2024-03-13 13:11:02 -07:00
Nathan Shively-Sanders
e66049084b
Revert "Defer processing of nested generic calls that return construc… (#57746) 2024-03-12 10:53:33 -07:00
Ron Buckton
aa18962892
Fix emit for export { default } from ... when both importHelpers and esModuleInterop are enabled (#57220) 2024-03-11 17:15:32 -04:00
Ron Buckton
1e982d880c
Report error when referencing class name from decorator (#57666) 2024-03-11 17:12:50 -04:00
Anders Hejlsberg
ef6a4ab5c7
Fix nullability intersections in CFA and relations (#57724) 2024-03-11 14:00:56 -07:00
Jake Bailey
e24d886305
Error on types named "undefined" (#57575) 2024-03-11 09:41:14 -07:00