Commit Graph
4304 Commits
Author SHA1 Message Date
Mateusz Burzyński 32b618c2d8 Fixed a crash when inferring return type of an accessor with errors in its return statement (#56258) 2023-11-15 17:39:58 -08:00
Sheetal NandiandJake Bailey cf5d7107a9 Track symbols per type thats cached and dont keep adding to them (#56421)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
2023-11-15 16:29:46 -08:00
Jake Bailey 3333e906dd Revert "Disallow numeric literals with negative numbers (#55268)" (#56422) 2023-11-15 15:51:47 -08:00
Andrew Branch a6367977d4 isolatedModules error on alias merging with local value (#56354) 2023-11-15 14:11:12 -08:00
Mateusz Burzyński 9f15002959 Fixed narrowing in case clauses that follow other clauses that return (#56358) 2023-11-13 14:41:56 -08:00
Zzzen 7b96c28e8f Add Support for Using Aliased Discriminants in Conditional Statements (#56173) 2023-11-08 15:06:40 -08:00
Jake Bailey 4dd1e2f844 Ensure instantiation expressions have symbols, preventing crash in signature relations (#56064) 2023-11-07 15:59:19 -08:00
Jake BaileyandWesley Wigham 1ed8ed6c27 Preserve original type parameter names more often when shadowed (#55820)
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
2023-11-06 15:45:16 -08:00
Mateusz Burzyński 6a9bc38da8 Do not narrow using JSDoc type assertion nodes (#56048) 2023-11-03 07:04:45 -07:00
Andrew Branch 0ee2db33ca Fix declaration emit in --moduleResolution bundler using wrong exports conditions (#56265) 2023-10-30 15:39:57 -07:00
Oleksandr T 60ce788302 fix(53933): Confusing rules around function parameter names in a type (#53946) 2023-10-30 15:24:14 -04:00
Isabel DuanandJake Bailey 29cfca319b add pushTypeResolution to getTypeOfAlias (#52642)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
2023-10-27 18:08:20 -07:00
Mateusz Burzyński a25321afce Ensure all JSX spread properties get visited in ES2018+ (#55859) 2023-10-27 11:36:21 -07:00
Changwon ChoeandNathan Shively-Sanders 598d912f69 Add conditions to check for class extension or implementation of prim… (#55712)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2023-10-26 12:41:58 -07:00
Mateusz Burzyński 1c49a8ba02 Filter possible contextual return types from unions for async functions and generators (#51196) 2023-10-26 12:03:01 -04:00
Ron Buckton 8e37e4b853 More reliable mechanism for _this/_super simplification (#56130) 2023-10-23 21:01:11 -04:00
Anders Hejlsberg b76b4c26ca Improve isDeeplyNestedType for homomorphic mapped types (#56169) 2023-10-23 08:53:46 -07:00
Anders Hejlsberg ac75a5ec9a Fix discriminant property check in CFA (#56156) 2023-10-19 14:04:41 -07:00
Gabriela Araujo Britto b1f5ef69e8 Improve error message for index signature on generic type when writing (#55906) 2023-10-18 17:43:43 -07:00
Mateusz Burzyński 0e07ff50ae Defer checking expressions in void expressions (#56122) 2023-10-16 10:16:19 -07:00
Mateusz Burzyński 521f8a8caf Ignore awaited self tail calls when collecting the return type of an async function (#56020) 2023-10-10 09:03:18 -07:00
Andrew Branch d0d406747d Add type reference directive for all visited references to ambient modules (#56015) 2023-10-09 11:38:15 -07:00
Mateusz Burzyński 9144836360 Fixed type narrowing in switch statements with parenthesized expressions (#56035) 2023-10-09 11:36:16 -07:00
Jake Bailey 53a3d24b95 Fix fallthrough and default in new switch-true narrowing (#55991) 2023-10-06 16:23:54 -07:00
Mateusz Burzyński 7377f5cb9d Fixed declaration emit of object literals withs divergent accessors (#55442) 2023-10-05 16:40:45 -07:00
Mateusz Burzyński 758884c093 Add a test for a property of reverse mapped type having a primitive type (#55807) 2023-10-04 13:27:42 -07:00
Mateusz Burzyński 274821eb88 Don't create children prop out of non-semantic JSX children (#55981) 2023-10-04 11:15:43 -07:00
Mateusz Burzyński d9cd2d0bd0 Fixed a crash in getPropertyNameForPropertyNameNode on NoSubstitutionTemplateLiteral (#55930) 2023-10-02 13:31:38 -07:00
Mateusz Burzyński 38d09d4ae1 Fixed na issue with evaluator using binding element initializers as const values (#55910) 2023-09-29 13:23:46 -07:00
Mateusz Burzyński 485a2ea0c9 Error on class fields accesses through super in JS files (#55892) 2023-09-29 12:29:39 -07:00
Ron Buckton 9cf44dc51a Support custom 'Symbol.hasInstance' methods when narrowing 'instanceof' (#55052) 2023-09-29 13:37:44 -04:00
Anders Hejlsberg c052bc7c72 Error on excessive relation complexity (#55851) 2023-09-26 15:57:57 -07:00
Oleksandr T 2e9e9a292c feat(53656): Add support for the updated import attributes proposal (#54242) 2023-09-26 13:20:15 -07:00
Jack WorksandNathan Shively-Sanders 5f818a9031 fix: class field is not accessible via super (#54056)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2023-09-22 16:20:12 -07:00
Mateusz Burzyński 1f88596bb1 Narrow by comparisons to boolean literals (#53714) 2023-09-19 13:38:31 -07:00
Mateusz Burzyński 70b7de11fb Narrow by clause expressions in switches with true condition (#53681) 2023-09-18 12:07:17 -07:00
Jake BaileyandMateusz Burzyński 9cbcf010ce Ensure generated property names for methods named "new" are quoted (#55750)
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
2023-09-15 10:25:10 -07:00
Babak K. ShandizandJake Bailey b3770e7852 🐛 Fix not emitting comments between sibling fields of object literals (#50097)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
2023-09-14 21:29:34 -07:00
Mateusz Burzyński e9af22ace9 Consistently return errorType for super expressions in classes that extend null (#55506) 2023-09-14 19:31:50 -07:00
Mateusz Burzyński e6321d77c7 Fixed element access expression writes for divergent write types (#55585) 2023-09-13 16:14:07 -07:00
c0b39c6967 Skip parsing JSDoc when not needed (#52921)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2023-09-13 15:58:20 -07:00
Andrew Branch 07bca994fa Avoid unnecessary resolution-mode assertion in declaration emit (#55727) 2023-09-13 13:31:19 -07:00
Mateusz Burzyński 4c34a181c3 Fixed declaration emit for expando properties on function declarations declared using element access expressions (#55183) 2023-09-13 12:07:33 -07:00
Zzzen 811a637e6f Fix issue with optional chaining and type inference in type guard (#55613) 2023-09-13 11:28:26 -07:00
Anders Hejlsberg 4f899a1691 Track recursive homomorphic mapped types by the symbol of their target (#55638) 2023-09-11 14:03:00 -07:00
Mateusz Burzyński f424a6be05 Discriminate types with divergent read/write property types (#55576) 2023-08-30 14:55:11 -07:00
Zzzen c5f92d4150 support generic variant setter (#55030) 2023-08-29 14:11:33 -07:00
Mateusz Burzyński 418494e4c4 Infer from parameters annotated using JSDoc (#55400) 2023-08-28 16:02:52 -07:00
Mateusz Burzyński 32ebbe05dc Transfer all declared symbols onto the type from the interface that extends another (#55252) 2023-08-28 15:17:44 -07:00
Wesley Wigham 5ce34cafad Avoid trying to emit anonymous classish/expando functions as assignments (#55472) 2023-08-28 12:15:53 -07:00