Commit 40163dc
* docs(wiki): document generic classes in @Generic section
The @Generic section predates v3.17.0 and did not mention that classes
can declare type parameters beyond the index-signature examples. Add:
- a sentence in the intro listing the v3.17.0 additions (generic class
inheritance with type arguments, generic parameters in @overload,
inline fun<T> function types in @field/@type)
- an example of a generic class with fields and methods, including
inheritance from an instantiated generic class, with a note on when
type parameters are substituted
- an example of the inline fun<T> generic function type
All examples verified against lua-language-server 3.18.2 using --check.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix: escape backtick
* update old generic example
* add newline
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: carsakiller <carsakiller@gmail.com>
1 parent b3b7a36 commit 40163dc
1 file changed
Lines changed: 50 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
650 | | - | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
651 | 653 | | |
652 | 654 | | |
653 | 655 | | |
| |||
727 | 729 | | |
728 | 730 | | |
729 | 731 | | |
730 | | - | |
| 732 | + | |
731 | 733 | | |
732 | 734 | | |
733 | 735 | | |
734 | 736 | | |
735 | 737 | | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
736 | 784 | | |
737 | 785 | | |
738 | 786 | | |
| |||
0 commit comments