-
Notifications
You must be signed in to change notification settings - Fork 3
1. How to make documents work
Prunoideae edited this page Mar 6, 2022
·
2 revisions
This part is simple, ProbeJS will generate a docs folder at runtime under the ProbeJS folder kubejs/probe, and documents will apply when you use /kubejs dump to generate typing.
However, there's something worth noting:
- ProbeJS will try to merge multiple documents of a same class when trying to modify the dump, and if there're multiple methods of same name and parameters, or multiple fields with same names, properties loaded earlier will be overridden by properties later.
class Test {
static A: 1;
static A: 2; //The Test.A will be 2, as the definition overrides the above.
}- In a same class, or a same file, the behavior is predictable, however, if in multiple files, the files are loaded by alphabetical order, so please be aware if you want to load conflicted properties. And if applicable, just avoid them by using more specific namespaces.