We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1083c8 commit d561f10Copy full SHA for d561f10
src/main/java/de/blazemcworld/jsscripts/TypingGen.java
@@ -33,7 +33,21 @@ public class TypingGen {
33
public static void genTypesIn(String targets) {
34
try {
35
Path out = JsScripts.MC.runDirectory.toPath()
36
- .resolve("JsScripts").resolve("types");
+ .resolve("JsScripts");
37
+
38
+ Files.writeString(out.resolve("jsconfig.json"), """
39
+ {
40
+ "compilerOptions": {
41
+ "typeRoots": ["types/global.d.ts"]
42
+ }
43
44
+ """);
45
46
+ out = out.resolve("types");
47
48
+ Files.writeString(out.resolve("global.d.ts"), """
49
+ declare const script: import("../types/de/blazemcworld/jsscripts/Script").default;
50
51
52
JsScripts.displayChat(Text.literal("Scanning available classes...").formatted(Formatting.AQUA));
53
0 commit comments