Commit aa7e2b0
authored
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.1 parent dbd4ef4 commit aa7e2b0
File tree
49 files changed
+1168
-384
lines changed- src
- compiler
- services
- codefixes
- refactors
- tests
- baselines/reference
- JSDocParsing
- api
- cases
- conformance/jsdoc
- fourslash
- server
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
49 files changed
+1168
-384
lines changedLarge diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
492 | 501 | | |
493 | 502 | | |
494 | 503 | | |
| |||
6331 | 6340 | | |
6332 | 6341 | | |
6333 | 6342 | | |
6334 | | - | |
6335 | | - | |
| 6343 | + | |
| 6344 | + | |
| 6345 | + | |
6336 | 6346 | | |
6337 | 6347 | | |
6338 | 6348 | | |
| |||
6386 | 6396 | | |
6387 | 6397 | | |
6388 | 6398 | | |
6389 | | - | |
| 6399 | + | |
6390 | 6400 | | |
6391 | 6401 | | |
6392 | 6402 | | |
| |||
6503 | 6513 | | |
6504 | 6514 | | |
6505 | 6515 | | |
6506 | | - | |
6507 | | - | |
| 6516 | + | |
6508 | 6517 | | |
6509 | 6518 | | |
6510 | 6519 | | |
| |||
6516 | 6525 | | |
6517 | 6526 | | |
6518 | 6527 | | |
6519 | | - | |
| 6528 | + | |
| 6529 | + | |
| 6530 | + | |
| 6531 | + | |
6520 | 6532 | | |
6521 | 6533 | | |
6522 | 6534 | | |
| |||
6531 | 6543 | | |
6532 | 6544 | | |
6533 | 6545 | | |
6534 | | - | |
6535 | | - | |
| 6546 | + | |
| 6547 | + | |
| 6548 | + | |
| 6549 | + | |
| 6550 | + | |
6536 | 6551 | | |
6537 | 6552 | | |
6538 | 6553 | | |
| |||
6605 | 6620 | | |
6606 | 6621 | | |
6607 | 6622 | | |
| 6623 | + | |
| 6624 | + | |
| 6625 | + | |
6608 | 6626 | | |
6609 | 6627 | | |
6610 | 6628 | | |
| |||
6665 | 6683 | | |
6666 | 6684 | | |
6667 | 6685 | | |
6668 | | - | |
6669 | | - | |
6670 | | - | |
| 6686 | + | |
| 6687 | + | |
| 6688 | + | |
6671 | 6689 | | |
6672 | 6690 | | |
6673 | 6691 | | |
| |||
6771 | 6789 | | |
6772 | 6790 | | |
6773 | 6791 | | |
6774 | | - | |
| 6792 | + | |
6775 | 6793 | | |
6776 | 6794 | | |
6777 | 6795 | | |
6778 | 6796 | | |
6779 | 6797 | | |
6780 | 6798 | | |
6781 | | - | |
6782 | | - | |
6783 | | - | |
6784 | | - | |
6785 | | - | |
6786 | | - | |
6787 | | - | |
6788 | | - | |
6789 | | - | |
6790 | | - | |
6791 | | - | |
6792 | | - | |
6793 | | - | |
| 6799 | + | |
| 6800 | + | |
6794 | 6801 | | |
| 6802 | + | |
6795 | 6803 | | |
6796 | 6804 | | |
6797 | 6805 | | |
| |||
6826 | 6834 | | |
6827 | 6835 | | |
6828 | 6836 | | |
| 6837 | + | |
6829 | 6838 | | |
6830 | | - | |
6831 | | - | |
6832 | | - | |
| 6839 | + | |
| 6840 | + | |
| 6841 | + | |
6833 | 6842 | | |
6834 | | - | |
6835 | | - | |
6836 | | - | |
6837 | | - | |
6838 | | - | |
6839 | | - | |
| 6843 | + | |
| 6844 | + | |
| 6845 | + | |
| 6846 | + | |
6840 | 6847 | | |
| 6848 | + | |
| 6849 | + | |
| 6850 | + | |
| 6851 | + | |
| 6852 | + | |
| 6853 | + | |
| 6854 | + | |
| 6855 | + | |
| 6856 | + | |
| 6857 | + | |
6841 | 6858 | | |
6842 | | - | |
6843 | | - | |
| 6859 | + | |
| 6860 | + | |
| 6861 | + | |
| 6862 | + | |
| 6863 | + | |
| 6864 | + | |
| 6865 | + | |
| 6866 | + | |
| 6867 | + | |
| 6868 | + | |
| 6869 | + | |
| 6870 | + | |
| 6871 | + | |
| 6872 | + | |
| 6873 | + | |
| 6874 | + | |
| 6875 | + | |
| 6876 | + | |
| 6877 | + | |
| 6878 | + | |
| 6879 | + | |
| 6880 | + | |
| 6881 | + | |
| 6882 | + | |
| 6883 | + | |
| 6884 | + | |
| 6885 | + | |
| 6886 | + | |
| 6887 | + | |
| 6888 | + | |
| 6889 | + | |
| 6890 | + | |
| 6891 | + | |
| 6892 | + | |
| 6893 | + | |
| 6894 | + | |
| 6895 | + | |
| 6896 | + | |
| 6897 | + | |
| 6898 | + | |
6844 | 6899 | | |
6845 | | - | |
6846 | 6900 | | |
6847 | 6901 | | |
6848 | 6902 | | |
| |||
6872 | 6926 | | |
6873 | 6927 | | |
6874 | 6928 | | |
| 6929 | + | |
6875 | 6930 | | |
6876 | 6931 | | |
6877 | 6932 | | |
| |||
6920 | 6975 | | |
6921 | 6976 | | |
6922 | 6977 | | |
6923 | | - | |
| 6978 | + | |
6924 | 6979 | | |
6925 | 6980 | | |
6926 | 6981 | | |
6927 | 6982 | | |
6928 | | - | |
| 6983 | + | |
6929 | 6984 | | |
6930 | 6985 | | |
6931 | 6986 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| 416 | + | |
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
| 420 | + | |
419 | 421 | | |
420 | 422 | | |
421 | 423 | | |
| |||
2053 | 2055 | | |
2054 | 2056 | | |
2055 | 2057 | | |
2056 | | - | |
| 2058 | + | |
2057 | 2059 | | |
2058 | 2060 | | |
2059 | 2061 | | |
| |||
2387 | 2389 | | |
2388 | 2390 | | |
2389 | 2391 | | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
2390 | 2407 | | |
2391 | 2408 | | |
2392 | 2409 | | |
| |||
4032 | 4049 | | |
4033 | 4050 | | |
4034 | 4051 | | |
4035 | | - | |
| 4052 | + | |
4036 | 4053 | | |
4037 | 4054 | | |
4038 | 4055 | | |
| |||
0 commit comments