redscript-mc 1.2.15 → 1.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * RedScript Builtin Metadata
3
+ *
4
+ * Comprehensive metadata for all builtin functions, used by:
5
+ * - generate-dts CLI command (produces builtins.d.mcrs)
6
+ * - VSCode extension hover docs
7
+ * - Type checker documentation
8
+ */
9
+ export type BuiltinParamType = 'int' | 'float' | 'string' | 'bool' | 'coord' | 'selector' | 'nbt' | 'block' | 'item' | 'entity' | 'effect' | 'sound' | 'dimension' | 'BlockPos' | 'T[]' | 'T';
10
+ export interface BuiltinParam {
11
+ name: string;
12
+ type: BuiltinParamType | string;
13
+ required: boolean;
14
+ default?: string;
15
+ doc: string;
16
+ docZh: string;
17
+ }
18
+ export interface BuiltinDef {
19
+ name: string;
20
+ params: BuiltinParam[];
21
+ returns: 'void' | 'int' | 'bool' | 'string';
22
+ doc: string;
23
+ docZh: string;
24
+ examples: string[];
25
+ compilesTo?: string;
26
+ category: string;
27
+ }
28
+ export declare const BUILTIN_METADATA: Record<string, BuiltinDef>;
29
+ /**
30
+ * Returns the .d.mcrs declaration file signature for a builtin function.
31
+ */
32
+ export declare function builtinToDeclaration(def: BuiltinDef): string;
33
+ /**
34
+ * Generates the full builtins.d.mcrs content.
35
+ */
36
+ export declare function generateDts(): string;