Skip to content

Commit 5fdde50

Browse files
authored
Merge master into release-2.9 (#24228)
* Optimize intersections of unions of unit types * Add regression test * Accept new baselines * LEGO: check in for master to temporary branch. * Add Unicode ThirdPartyNotice * Properly handle edge cases * Sort the whole diagnostic, plus giving up on isolating tests (#24186) * Sort the whole diagnostic * Also strip references to our repos node_modules, since removing it is hard * LEGO: check in for master to temporary branch. * add quick fix for import type missing typeof * Add callback tag, with type parameters (#23947) * Add initial tests * Add types * Half of parsing (builds but does not pass tests) * Parsing done; types are uglier; doesn't crash but doesn't pass * Bind callback tag Builds but tests still don't pass * Only bind param tags inside callback tags * Fix binding switch to only handle param tags once * Checking is 1/3 done or so. Now I'm going to go rename some members to be more uniform. I hate unnnecessary conditionals. * Rename typeExpression to type (for some jsdoc) (maybe I'll rename more later) * Rename the rest of typeExpressions Turns out there is a constraint in services such that they all need to be named the same. * Few more checker changes * Revert "Rename the rest of typeExpressions" This reverts commit f41a96b. * Revert "Rename typeExpression to type (for some jsdoc)" This reverts commit 7d2233a. * Finish undoing typeExpression rename * Rename and improve getTypeParametersForAliasSymbol Plus some other small fixes * Core checking works, but is flabbergastingly messy I'm serious. * Callback return types work now * Fix crash in services * Make github diff smaller * Try to make github diff even smaller * Fix rename for callback tag * Fix nav bar for callback tag Also clean up some now-redundant code there to find the name of typedefs. * Handle ooorder callback tags Also get rid of redundant typedef name code *in the binder*. It's everywhere! * Add ooorder callback tag test * Parse comments for typedef/callback+display param comments * Always export callbacks This requires almost no new code since it is basically the same as typedefs * Update baselines * Fix support for nested namespaced callbacks And add test * Callbacks support type parameters 1. Haven't run it with all tests 2. Haven't tested typedef tags yet 3. Still allows shared symbols when on function or class declarations. * Template tags are now bound correctly * Test oorder template tags It works. * Parser cleanup * Cleanup types and utilities As much as possible, and not as much as I would like. * Handle callback more often in services * Cleanup of binder and checker * More checker cleanup * Remove TODOs and one more cleanup * Support parameter-less callback tags * Remove extra bind call on template type parameters * Bind template tag containers Doesn't quite work with typedefs, but that's because it's now stricter, without the typedef fixes. I'm going to merge with jsdoc/callback and see how it goes. * Fix fourslash failures * Stop pre-binding js type aliases Next up, stop pre-binding js type parameters * Further cleanup of delayed js type alias binding * Stop prebinding template tags too This gets rid of prebinding entirely * Remove TODO * Fix lint * Finish merge with use-jsdoc-aliases * Update callback tag baselines * Rename getTypeParametersForAliasSymbol The real fix is *probably* to rename Type.aliasTypeArguments to aliasTypeParameters, but I want to make sure and then put it in a separate PR. * moveToNewFile: Don't move imports (#24177) * Reduce map lookups (#24203) * Fix jsdoc type resolution [merge to master] (#24204) * Fix JSDoc type resolution Breaks type parameter resolution that is looked up through prototype methods, though. I need to fix that still. * Check for prototype method assignments first * Undo dedupe changes to getJSDocTags * JS Type aliases can't refer to host type params Previously, js type aliases (@typedef and @callback) could refer to type paremeters defined in @template tags in a *different* jsdoc tag, as long as both tags were hosted on the same signature. * Reduce dedupe changes+update baseline The only reason I had undone them was to merge successfully with an older state of master. * Add undefined guard * moveToNewFile: Fix bug for VariableDeclaration missing initializer (#24214) * Use import types to refer to declarations in declaration emit (#24071) * Stand up a simple implementation using import types for exports of modules which are otherwise inaccessible * Ensure references exist to link to modules containing utilized ambient modules * Accept baselines with new import type usage * Fix lint * Accept changed baseline (#24222) * fixUnusedIdentifier: Don't delete node whose ancestor was already deleted (#24207) * More robust circularity detection in node builder (#24225) * Improve ChangeTracker#deleteNodeInList (#24221) * moveToNewFile: Fix bug for missing importClause (#24224) * Set startPos at EOF in jsdoc token scanner so node end positions for nodes terminated at EoF are right (#24184) * Set startPos at EOF in jsdoc token scanner to node end positions for nodes terminated at EoF are right * More complete nonwhitespace token check, fix syntactica jsdoc classifier * Use loop and no nested lookahead * Do thigns unrelated to the bug in the test * Fix typo move return * Patch up typedef end pos * Fix indentation, make end pos target more obvious
1 parent 37d2b2b commit 5fdde50

File tree

187 files changed

+3666
-2259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+3666
-2259
lines changed

ThirdPartyNoticeText.txt

+76-15
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,96 @@
11
/*!----------------- TypeScript ThirdPartyNotices -------------------------------------------------------
22

3-
The TypeScript software is based on or incorporates material and code from the projects listed below
4-
(collectively "Third Party Code"). Microsoft is not the original author of the
5-
Third Party Code. The original copyright notice and the license, under which
6-
Microsoft received such Third Party Code, are set forth below. Such license and
7-
notices are provided for informational purposes only. Microsoft licenses the Third
3+
The TypeScript software is based on or incorporates material and code from the projects listed below
4+
(collectively "Third Party Code"). Microsoft is not the original author of the
5+
Third Party Code. The original copyright notice and the license, under which
6+
Microsoft received such Third Party Code, are set forth below. Such license and
7+
notices are provided for informational purposes only. Microsoft licenses the Third
88
Party Code to you under the terms of the Apache 2.0 License.
9-
All Third Party Code licensed by Microsoft under the Apache License, Version 2.0 (the "License"); you
10-
may not use this file except in compliance with the License. You may obtain a copy
9+
All Third Party Code licensed by Microsoft under the Apache License, Version 2.0 (the "License"); you
10+
may not use this file except in compliance with the License. You may obtain a copy
1111
of the License at http://www.apache.org/licenses/LICENSE-2.0
1212

13-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14-
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR
15-
CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
13+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14+
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR
15+
CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
1616

17-
See the Apache Version 2.0 License for specific language governing permissions and
17+
See the Apache Version 2.0 License for specific language governing permissions and
1818
limitations under the License.
1919
---------------------------------------------
2020
Third Party Code Components
2121
--------------------------------------------
2222

2323
------------------- DefinitelyTyped --------------------
24-
This file is based on or incorporates material from the projects listed below (collectively "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
24+
This file is based on or incorporates material from the projects listed below (collectively "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
2525
DefinitelyTyped
2626
This project is licensed under the MIT license.
2727
Copyrights are respective of each contributor listed at the beginning of each definition file.
2828
Provided for Informational Purposes Only
29-
30-
MIT License
31-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
29+
30+
MIT License
31+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3232
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
3333
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3434
--------------------------------------------------------------------------------------
35+
36+
------------------- Unicode --------------------
37+
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
38+
39+
Unicode Data Files include all data files under the directories
40+
http://www.unicode.org/Public/, http://www.unicode.org/reports/,
41+
http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
42+
http://www.unicode.org/utility/trac/browser/.
43+
44+
Unicode Data Files do not include PDF online code charts under the
45+
directory http://www.unicode.org/Public/.
46+
47+
Software includes any source code published in the Unicode Standard
48+
or under the directories
49+
http://www.unicode.org/Public/, http://www.unicode.org/reports/,
50+
http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
51+
http://www.unicode.org/utility/trac/browser/.
52+
53+
NOTICE TO USER: Carefully read the following legal agreement.
54+
BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
55+
DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
56+
YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
57+
TERMS AND CONDITIONS OF THIS AGREEMENT.
58+
IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
59+
THE DATA FILES OR SOFTWARE.
60+
61+
COPYRIGHT AND PERMISSION NOTICE
62+
63+
Copyright (c) 1991-2017 Unicode, Inc. All rights reserved.
64+
Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
65+
66+
Permission is hereby granted, free of charge, to any person obtaining
67+
a copy of the Unicode data files and any associated documentation
68+
(the "Data Files") or Unicode software and any associated documentation
69+
(the "Software") to deal in the Data Files or Software
70+
without restriction, including without limitation the rights to use,
71+
copy, modify, merge, publish, distribute, and/or sell copies of
72+
the Data Files or Software, and to permit persons to whom the Data Files
73+
or Software are furnished to do so, provided that either
74+
(a) this copyright and permission notice appear with all copies
75+
of the Data Files or Software, or
76+
(b) this copyright and permission notice appear in associated
77+
Documentation.
78+
79+
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
80+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
81+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
82+
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
83+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
84+
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
85+
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
86+
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
87+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
88+
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
89+
90+
Except as contained in this notice, the name of a copyright holder
91+
shall not be used in advertising or otherwise to promote the sale,
92+
use or other dealings in these Data Files or Software without prior
93+
written authorization of the copyright holder.
94+
--------------------------------------------------------------------------------------
95+
3596
------------- End of ThirdPartyNotices --------------------------------------------------- */

0 commit comments

Comments
 (0)