Zzzen and GitHub
a42379179b
fix merging of function and derived class ( #47170 )
2021-12-16 17:29:07 -08:00
Kagami Sascha Rosylight and GitHub
20e86dab5b
Emit class fields as-is with target: es2022 ( #47018 )
...
* Emit class fields as-is with `target: es2022`
Closes #47017
* wave 2
2021-12-16 15:15:33 -08:00
Oleksandr T and GitHub
c282771d59
fix(47004): ignore arguments name in PropertyAssignment ( #47054 )
2021-12-16 13:05:48 -08:00
Oleksandr T and GitHub
93bdfd2511
fix(47056): report errors for all properties with errors ( #47057 )
2021-12-16 12:58:15 -08:00
Andrew Nguyen and GitHub
270b0d1c73
fix(46824): remove duplicate private identifier errors ( #47116 )
2021-12-16 12:07:12 -08:00
Tao Cumplido and GitHub
2bbdb31b07
update es2020.intl DisplayNames#of ( #47157 )
...
fix return type of Intl.DisplayNames.prototype.of
was typed to return always string but can actually return undefined too
see spec https://tc39.es/ecma402/#sec-Intl.DisplayNames.prototype.of
2021-12-15 17:51:35 +00:00
Anders Hejlsberg and GitHub
3d3825e783
Fix multiple issues with indexed access types applied to mapped types ( #47109 )
...
* Fix multiple issues with indexed access types applied to mapped types
* Add tests
2021-12-14 11:51:03 -08:00
LowR and GitHub
7e0e8671fa
fix(47134): show all meanings for type-only imports and exports ( #47138 )
2021-12-14 10:58:21 -08:00
Hiroshi Ogawa and GitHub
8974fead2d
fix(47062): support generic arrow function with default type parameter in tsx ( #47112 )
...
* fix(47062): support generic arrow function with default type parameter in tsx
* test: update test "completionListIsGlobalCompletion"
2021-12-14 09:02:36 -08:00
Armando Aguirre and GitHub
67872a50d0
Fix enums and namespace merge ( #47059 )
...
* Fix enums and namespace merge
* Remove unused comment
2021-12-13 14:03:19 -08:00
Andrew Branch and GitHub
430599722e
Fix extract type crash ( #47136 )
2021-12-13 10:39:34 -08:00
Anders Hejlsberg and GitHub
06746efbd9
Revert change to getFalsyFlags ( #47125 )
...
* Revert change to getFalsyFlags
* Add regression test
2021-12-13 09:05:55 -08:00
Oleksandr T and GitHub
df87a8c12d
fix(44693): emit declaration of JSDoc overridden properties with different types ( #46797 )
2021-12-10 11:06:59 -08:00
Jake Bailey and GitHub
0ed9247e17
Explicitly Omit unspreadable properties from rest type in the generic case ( #47078 )
2021-12-09 11:45:52 -08:00
Song Gao and GitHub
e2c89af335
use default type parameter rather than unknown when show quick help ( #46792 )
...
* use default type parameter rather than `unknown` when show quick help
* prefer default type parameter than constraint for quick info
2021-12-08 17:02:22 -08:00
David Sherret and GitHub
921825585d
fix: do not use ts.NodeArray in factory inputs ( #46843 )
2021-12-08 16:57:52 -08:00
Nathan Shively-Sanders and GitHub
a2c7fa2d05
Add 12 more grammar errors ( #47075 )
...
These are the last ones that I know of. They come from calls to
`grammarErrorOnFirstToken`.
Fixes part of #45349
Follow-up to #47067
2021-12-08 16:54:58 -08:00
Ron Buckton and GitHub
c8f1a874a3
Exempt tslib from indirect call transform ( #47070 )
2021-12-08 15:42:37 -08:00
Nathan Shively-Sanders and GitHub
a72bf5410c
Plain JS grammar errors ( #47067 )
...
* Plain JS grammar errors
From the list in
https://github.com/microsoft/TypeScript/issues/45349#issuecomment-974561208 ,
excluding the JSX errors, decorator errors and unresolved #private
error. The latter re-uses "Cannot resolve name X" which naturally shows
up a *lot* in plain JS.
* Add grammarErrorAtPos errors
Also remove checkGrammarArguments; it's blocked entirely by the same
parser error.
2021-12-08 15:16:23 -08:00
Oleksandr T and GitHub
022542548e
fix(47043): as const cast wrong colour when using typescript 4.5.2 ( #47066 )
2021-12-08 10:15:58 -08:00
Oleksandr T and GitHub
5f372d9d7e
fix(46606): show completion in jsdoc property tag ( #46657 )
2021-12-07 15:28:41 -08:00
Ron Buckton and GitHub
67f84ef771
Fix Awaited<T> for onfulfilled callbacks with more than one argument ( #46951 )
2021-12-07 15:21:11 -08:00
7a12909ae3
fix(45713) Improve error report summaries ( #45742 )
...
* Improve error report summaries (#45713 )
* fixup! Improve error report summaries (#45713 )
* fixup! fixup! Improve error report summaries (#45713 )
* Adds support for handling localization renaming the 'files' header due to localization
* fixup! Adds support for handling localization renaming the 'files' header due to localization
- Fixed baseline error
- Fixed linter error
Co-authored-by: Orta <git@orta.io >
Co-authored-by: Orta Therox <ortam@microsoft.com >
2021-12-07 10:50:44 +00:00
Jake Bailey and GitHub
4013271cd8
Unwrap parens when checking for JSDocFunctionType in conditional expression ( #46962 )
2021-12-06 16:44:37 -08:00
Oleksandr T and GitHub
4761ba6285
fix(46998): Hover on as const shows type const = /*unresolved*/ any ( #47000 )
2021-12-06 14:41:46 -08:00
1fe9bfdd0e
Fix strict/es5+ octal literal 2x error #46810 ( #46823 )
...
* Fix strict/es5+ octal literal 2x error #46810
Signed-off-by: Jay Clark <jay@jayeclark.dev >
* Accept baseline test changes
Signed-off-by: Jay Clark <jay@jayeclark.dev >
* Add test case
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com >
2021-12-06 12:46:08 -08:00
Anders Hejlsberg and GitHub
2a7eb58589
Properly union inferred template literal string types ( #46782 )
...
* Template literals and string mappings have 'string' as base type
* Add regression test
* Add tests for generic template literals
* One more test
2021-12-06 10:51:50 -08:00
7a1687de26
fix(42678): detect access to uninitialized variable in IIFE ( #42776 )
...
* fix(42678): detect access to uninitialized variable in IIFE
* improve performance
* Add missing space to match coding guidelines
* simplify the implementation
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com >
2021-12-06 10:42:20 -08:00
Yuki Osaki and GitHub
1f275d705d
"No repeated property names" error in object literals is duplicated in strict mode ( #46929 )
...
* "No repeated property names" error in object literals is duplicated in strict mode
* fix indent
2021-12-06 10:22:28 -08:00
Wesley Wigham and GitHub
97a7901f26
Use features for selected module resolution rather than all features for type reference directives, since they can add restrictions to resolutions ( #47007 )
2021-12-04 04:24:28 -08:00
Anders Hejlsberg and GitHub
b2af6051ef
Improve isValidSpreadType check ( #47010 )
...
* Fix getFalsyFlags for intersection types
* Fix and simplify isValidSpreadType
* Slight tweak
* Add tests
2021-12-03 16:11:01 -08:00
Andrew Branch and GitHub
2ce05a8292
Completions sorting overhaul ( #46703 )
...
* Sort resolved auto-import completions by number of directory separators
* Sort completions in services layer
* Finish tests
* Fix more tests
* Respect SortText in completions
* Update tests to use `unsorted` assertion
2021-12-03 14:54:51 -08:00
Andrew Branch and GitHub
240ba0acef
Fix checker initialization crash ( #46973 )
...
* Fix checker initialization crash
* Move checks to a place that makes more sense
2021-12-03 14:30:03 -08:00
Oleksandr T and GitHub
407edc95c0
fix(46563): show completions at this type ( #46581 )
2021-12-03 14:29:45 -08:00
Oleksandr T and GitHub
c5d9200ec6
feat(46986): offer QF for using await outside of async context ( #46994 )
2021-12-03 12:36:19 -08:00
Oleksandr T and GitHub
4b794fe1dd
fix(46345): omit temp variable for computed property name in ambient context ( #46446 )
2021-12-02 16:04:11 -08:00
LowR and GitHub
bedc8d4124
fix(46195): handle numeric separators and larger integers correctly in codefix for large integers ( #46389 )
...
* fix(46195): handle numeric separators and larger integers correctly
* Use `indexOf()` instead of `includes()`
2021-12-02 16:01:43 -08:00
670ad45bda
Describe defaults of more options ( #46498 )
...
* Describe defaults of more options
* Use enum members/values vs. strings
* Update Baselines and/or Applied Lint Fixes
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com >
2021-12-01 07:45:00 -08:00
Andrew Casey and GitHub
b8ec791ca1
Don't call afterEach within beforeEach ( #46963 )
...
Otherwise, a new afterEach handler is added for each test case and the
number of handlers run grows quadratically.
2021-11-30 15:08:42 -08:00
Jake Bailey and GitHub
cdf12f91c7
Fix parsing of parenthesized functions in conditional expressions ( #46960 )
2021-11-30 12:57:37 -08:00
d3d088fac5
fix(44639): Transpilation of optional chaining combined with type casting results in function call losing its context ( #44666 )
...
* fix(44639): Fix emit for optional chain with type assertions
* Move ASI-blocking parens out of ts transform
* Add missing comments from PartiallyEmittedExpression+minor cleanup
* Avoid comment duplication on copied receiver
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com >
2021-11-29 13:22:53 -08:00
Andrew Branch and GitHub
68bf5a519a
Fix formatting the end of a selection ( #46875 )
...
* Fix formatting edits at end of range
* Adjust test
* Revert API baseline changes
2021-11-29 09:27:21 -08:00
Daniel Rosenwasser and GitHub
2e706758af
Add function names for code fixes. ( #46728 )
...
* Add function names for code fixes.
* Remove double space.
* Undo CRLF -> LF change.
2021-11-27 12:15:07 -08:00
Daniel Rosenwasser and GitHub
a90389a22d
Switch deferredNodes from a Map to a Set. ( #46751 )
2021-11-23 17:46:33 -08:00
Nathan Shively-Sanders and GitHub
868c275fdf
Plain JS binder errors ( #46816 )
...
* Plain JS binder errors
Issue select errors from the binder in JS files that do not have checkJS
explicitly turned on or off. These errors mirror runtime checks done by
Javascript.
* Rest of plain JS binder errors
* address PR comments
* Only issue binder errors in plain JS.
Checker errors require requesting diagnostics, which stll needs to be
peformance tested.
This commit removes one cross-file duplicate declaration error in the tests.
* fix const lint
2021-11-18 17:13:06 -08:00
Oleksandr T and GitHub
6143237376
fix(46366): handle enum string access as enumMemberName ( #46431 )
2021-11-18 15:50:32 -08:00
Andrew Casey and GitHub
1ade73df2b
Stop calling our own @deprecrated APIs ( #46831 )
...
* Clean up createMap
* Delete dead createMapFromTemplate
* Clean up assertDefined
* Delete dead assertEachDefined
* Delete dead createUnderscoreEscapedMap
* Delete dead hasEntries
* Delete dead ReadonlyNodeSet, NodeSet, ReadonlyNodeMap, NodeMap
* Use updated SyntaxKind names
* Update API baselines
2021-11-18 10:37:55 -08:00
de4ba0f208
enable go-to-type-definition on type nodes ( #46714 )
...
* enable go-to-type-definition on type nodes
* only go when symbol has no value meaning
* Update formatting of src/services/goToDefinition.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 >
2021-11-18 08:55:54 -08:00
Oleksandr T and GitHub
a75f26e68b
fix(42238): emit this parameter in function declaration ( #46511 )
2021-11-17 15:43:27 -08:00
Andrew Branch and GitHub
f11f14baba
Fix broken module resolution after large/rapid edits in nodenext ( #46818 )
...
* Fix broken module resolution after edits in nodenext
* Move field copying to a better place I guess
2021-11-17 13:04:43 -08:00