@bscotch/yy 0.6.1 → 0.6.2
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.
- package/LICENSE.md +23 -0
- package/dist/Yy.d.ts +6859 -6829
- package/dist/Yy.d.ts.map +1 -1
- package/dist/Yy.js +247 -246
- package/dist/Yy.js.map +1 -1
- package/dist/Yy.parse.d.ts +5 -5
- package/dist/Yy.parse.js +240 -240
- package/dist/Yy.stringify.d.ts +6 -6
- package/dist/Yy.stringify.js +129 -129
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +16 -16
- package/dist/index.d.ts +8 -8
- package/dist/index.js +8 -8
- package/dist/types/YyBase.d.ts +46 -46
- package/dist/types/YyBase.js +37 -37
- package/dist/types/YyObject.d.ts +454 -462
- package/dist/types/YyObject.d.ts.map +1 -1
- package/dist/types/YyObject.js +108 -108
- package/dist/types/YyRoom.d.ts +1474 -1507
- package/dist/types/YyRoom.d.ts.map +1 -1
- package/dist/types/YyRoom.js +155 -155
- package/dist/types/YyScript.d.ts +45 -47
- package/dist/types/YyScript.d.ts.map +1 -1
- package/dist/types/YyScript.js +8 -8
- package/dist/types/YySound.d.ts +107 -115
- package/dist/types/YySound.d.ts.map +1 -1
- package/dist/types/YySound.js +61 -61
- package/dist/types/YySprite.d.ts +5438 -5446
- package/dist/types/YySprite.d.ts.map +1 -1
- package/dist/types/YySprite.js +417 -417
- package/dist/types/YySprite.lib.d.ts +221 -215
- package/dist/types/YySprite.lib.d.ts.map +1 -1
- package/dist/types/YySprite.lib.js +35 -35
- package/dist/types/Yyp.d.ts +604 -604
- package/dist/types/Yyp.js +101 -101
- package/dist/types/utility.d.ts +64 -64
- package/dist/types/utility.js +104 -104
- package/package.json +16 -11
- package/dist/Schema.d.ts +0 -1
- package/dist/Schema.d.ts.map +0 -1
- package/dist/Schema.js +0 -2
- package/dist/Schema.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YyRoom.d.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwJhC,CAAC"}
|
package/dist/types/YyRoom.js
CHANGED
|
@@ -1,156 +1,156 @@
|
|
|
1
|
-
// Generated by ts-to-zod
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { fixedNumber, randomString, unstable, yyResourceIdSchemaGenerator, } from './utility.js';
|
|
4
|
-
import { yyBaseSchema } from './YyBase.js';
|
|
5
|
-
const yyRoomViewSchema = unstable({
|
|
6
|
-
inherit: z.boolean().default(false),
|
|
7
|
-
visible: z.boolean().default(false),
|
|
8
|
-
xview: z.number().default(0),
|
|
9
|
-
yview: z.number().default(0),
|
|
10
|
-
wview: z.number().default(1366),
|
|
11
|
-
hview: z.number().default(768),
|
|
12
|
-
xport: z.number().default(0),
|
|
13
|
-
yport: z.number().default(0),
|
|
14
|
-
wport: z.number().default(1366),
|
|
15
|
-
hport: z.number().default(768),
|
|
16
|
-
hborder: z.number().default(32),
|
|
17
|
-
vborder: z.number().default(32),
|
|
18
|
-
hspeed: z.number().default(-1),
|
|
19
|
-
vspeed: z.number().default(-1),
|
|
20
|
-
/** The object being followed */
|
|
21
|
-
objectId: z.unknown().nullable().default(null),
|
|
22
|
-
});
|
|
23
|
-
export const yyRoomInstanceSchema = unstable({
|
|
24
|
-
/**
|
|
25
|
-
* *Unique* instance name. Can be any string. Needed to allow multiple
|
|
26
|
-
* instances of the same object to be added to a room via the editor.
|
|
27
|
-
*/
|
|
28
|
-
name: z.string().default(() => randomString()),
|
|
29
|
-
properties: z.array(z.unknown()).default([]),
|
|
30
|
-
isDnd: z.boolean().default(false),
|
|
31
|
-
/** The type of the object being instanced */
|
|
32
|
-
objectId: yyResourceIdSchemaGenerator('objects'),
|
|
33
|
-
inheritCode: z.boolean().default(false),
|
|
34
|
-
hasCreationCode: z.literal(false).default(false),
|
|
35
|
-
colour: z.number().default(4294967295),
|
|
36
|
-
rotation: fixedNumber().default(0),
|
|
37
|
-
scaleX: fixedNumber().default(1),
|
|
38
|
-
scaleY: fixedNumber().default(1),
|
|
39
|
-
imageIndex: z.number().default(0),
|
|
40
|
-
imageSpeed: fixedNumber().default(1),
|
|
41
|
-
inheritedItemId: z.unknown().nullable().default(null),
|
|
42
|
-
frozen: z.boolean().default(false),
|
|
43
|
-
ignore: z.boolean().default(false),
|
|
44
|
-
inheritItemSettings: z.boolean().default(false),
|
|
45
|
-
/**
|
|
46
|
-
* Initial x-coords of the instance
|
|
47
|
-
*/
|
|
48
|
-
x: fixedNumber().default(0),
|
|
49
|
-
/**
|
|
50
|
-
* Initial y-coords of the instance
|
|
51
|
-
*/
|
|
52
|
-
y: fixedNumber().default(0),
|
|
53
|
-
resourceVersion: z.literal('1.0').default('1.0'),
|
|
54
|
-
tags: z.array(z.string()).optional(),
|
|
55
|
-
resourceType: z.literal('GMRInstance').default('GMRInstance'),
|
|
56
|
-
});
|
|
57
|
-
const yyRoomLayerBaseSchema = unstable({
|
|
58
|
-
visible: z.boolean().default(true),
|
|
59
|
-
effectEnabled: z.boolean().optional().default(true),
|
|
60
|
-
effectType: z.unknown().optional().default(null),
|
|
61
|
-
userdefinedDepth: z.boolean().default(false),
|
|
62
|
-
inheritLayerDepth: z.boolean().default(false),
|
|
63
|
-
inheritLayerSettings: z.boolean().default(false),
|
|
64
|
-
gridX: z.number().default(32),
|
|
65
|
-
gridY: z.number().default(32),
|
|
66
|
-
layers: z.array(z.unknown()).default([]),
|
|
67
|
-
hierarchyFrozen: z.boolean().default(false),
|
|
68
|
-
properties: z.array(z.unknown()).optional().default([]),
|
|
69
|
-
});
|
|
70
|
-
const yyRoomInstanceLayerSchema = yyRoomLayerBaseSchema.extend({
|
|
71
|
-
instances: z.array(yyRoomInstanceSchema).default([]),
|
|
72
|
-
depth: z.number().default(0),
|
|
73
|
-
resourceVersion: z.literal('1.0').default('1.0'),
|
|
74
|
-
/**
|
|
75
|
-
* @default "Instances"
|
|
76
|
-
*/
|
|
77
|
-
name: z.string().default('Instances'),
|
|
78
|
-
tags: z.array(z.string()).optional(),
|
|
79
|
-
resourceType: z.literal('GMRInstanceLayer'),
|
|
80
|
-
});
|
|
81
|
-
const yyRoomBackgroundLayerSchema = yyRoomLayerBaseSchema.extend({
|
|
82
|
-
spriteId: z.null().default(null),
|
|
83
|
-
colour: z.number().default(4278190080),
|
|
84
|
-
x: z.number().default(0),
|
|
85
|
-
y: z.number().default(0),
|
|
86
|
-
htiled: z.boolean().default(false),
|
|
87
|
-
vtiled: z.boolean().default(false),
|
|
88
|
-
hspeed: z.number().default(0),
|
|
89
|
-
vspeed: z.number().default(0),
|
|
90
|
-
stretch: z.boolean().default(false),
|
|
91
|
-
animationFPS: z.number().default(15),
|
|
92
|
-
animationSpeedType: z.number().default(0),
|
|
93
|
-
userdefinedAnimFPS: z.boolean().default(false),
|
|
94
|
-
depth: z.number().default(100),
|
|
95
|
-
properties: z.array(z.unknown()).optional(),
|
|
96
|
-
resourceVersion: z.literal('1.0').default('1.0'),
|
|
97
|
-
/**
|
|
98
|
-
* @default "Background"
|
|
99
|
-
*/
|
|
100
|
-
name: z.string().default('Background'),
|
|
101
|
-
tags: z.array(z.string()).optional(),
|
|
102
|
-
resourceType: z.literal('GMRBackgroundLayer'),
|
|
103
|
-
});
|
|
104
|
-
const yyRoomInstanceCreationOrderEntrySchema = z.object({
|
|
105
|
-
/**
|
|
106
|
-
* The *instance name*, which can be custom.
|
|
107
|
-
* Must match one of the YyRoomInstance names.
|
|
108
|
-
*/
|
|
109
|
-
name: z.string(),
|
|
110
|
-
/** The room's path */
|
|
111
|
-
path: z.string(),
|
|
112
|
-
});
|
|
113
|
-
const yyRoomLayerSchema = z.discriminatedUnion('resourceType', [
|
|
114
|
-
yyRoomInstanceLayerSchema,
|
|
115
|
-
yyRoomBackgroundLayerSchema,
|
|
116
|
-
]);
|
|
117
|
-
export const yyRoomSchema = yyBaseSchema.extend({
|
|
118
|
-
layers: z.array(yyRoomLayerSchema).default([]),
|
|
119
|
-
instanceCreationOrder: z
|
|
120
|
-
.array(yyRoomInstanceCreationOrderEntrySchema)
|
|
121
|
-
.default([]),
|
|
122
|
-
roomSettings: unstable({
|
|
123
|
-
inheritRoomSettings: z.boolean().default(false),
|
|
124
|
-
Width: z.number().default(1366),
|
|
125
|
-
Height: z.number().default(768),
|
|
126
|
-
persistent: z.boolean().default(false),
|
|
127
|
-
}).default({}),
|
|
128
|
-
viewSettings: unstable({
|
|
129
|
-
inheritViewSettings: z.boolean().default(false),
|
|
130
|
-
enableViews: z.boolean().default(false),
|
|
131
|
-
clearViewBackground: z.boolean().default(false),
|
|
132
|
-
clearDisplayBuffer: z.boolean().default(true),
|
|
133
|
-
}).default({}),
|
|
134
|
-
physicsSettings: unstable({
|
|
135
|
-
inheritPhysicsSettings: z.boolean().default(false),
|
|
136
|
-
PhysicsWorld: z.boolean().default(false),
|
|
137
|
-
PhysicsWorldGravityX: fixedNumber().default(0),
|
|
138
|
-
PhysicsWorldGravityY: fixedNumber().default(10),
|
|
139
|
-
PhysicsWorldPixToMetres: fixedNumber().default(0),
|
|
140
|
-
}).default({}),
|
|
141
|
-
isDnd: z.boolean().default(false),
|
|
142
|
-
volume: fixedNumber().default(10),
|
|
143
|
-
parentRoom: z.unknown().nullable().default(null),
|
|
144
|
-
/**
|
|
145
|
-
* 8 identical 'views' are created by default.
|
|
146
|
-
* @default []
|
|
147
|
-
*/
|
|
148
|
-
views: z.array(yyRoomViewSchema).default([]),
|
|
149
|
-
inheritLayers: z.boolean().default(false),
|
|
150
|
-
creationCodeFile: z.string().default("''"),
|
|
151
|
-
inheritCode: z.boolean().default(false),
|
|
152
|
-
inheritCreationOrder: z.boolean().default(false),
|
|
153
|
-
sequenceId: z.unknown().default(null),
|
|
154
|
-
resourceType: z.literal('GMRoom').default('GMRoom'),
|
|
155
|
-
});
|
|
1
|
+
// Generated by ts-to-zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { fixedNumber, randomString, unstable, yyResourceIdSchemaGenerator, } from './utility.js';
|
|
4
|
+
import { yyBaseSchema } from './YyBase.js';
|
|
5
|
+
const yyRoomViewSchema = unstable({
|
|
6
|
+
inherit: z.boolean().default(false),
|
|
7
|
+
visible: z.boolean().default(false),
|
|
8
|
+
xview: z.number().default(0),
|
|
9
|
+
yview: z.number().default(0),
|
|
10
|
+
wview: z.number().default(1366),
|
|
11
|
+
hview: z.number().default(768),
|
|
12
|
+
xport: z.number().default(0),
|
|
13
|
+
yport: z.number().default(0),
|
|
14
|
+
wport: z.number().default(1366),
|
|
15
|
+
hport: z.number().default(768),
|
|
16
|
+
hborder: z.number().default(32),
|
|
17
|
+
vborder: z.number().default(32),
|
|
18
|
+
hspeed: z.number().default(-1),
|
|
19
|
+
vspeed: z.number().default(-1),
|
|
20
|
+
/** The object being followed */
|
|
21
|
+
objectId: z.unknown().nullable().default(null),
|
|
22
|
+
});
|
|
23
|
+
export const yyRoomInstanceSchema = unstable({
|
|
24
|
+
/**
|
|
25
|
+
* *Unique* instance name. Can be any string. Needed to allow multiple
|
|
26
|
+
* instances of the same object to be added to a room via the editor.
|
|
27
|
+
*/
|
|
28
|
+
name: z.string().default(() => randomString()),
|
|
29
|
+
properties: z.array(z.unknown()).default([]),
|
|
30
|
+
isDnd: z.boolean().default(false),
|
|
31
|
+
/** The type of the object being instanced */
|
|
32
|
+
objectId: yyResourceIdSchemaGenerator('objects'),
|
|
33
|
+
inheritCode: z.boolean().default(false),
|
|
34
|
+
hasCreationCode: z.literal(false).default(false),
|
|
35
|
+
colour: z.number().default(4294967295),
|
|
36
|
+
rotation: fixedNumber().default(0),
|
|
37
|
+
scaleX: fixedNumber().default(1),
|
|
38
|
+
scaleY: fixedNumber().default(1),
|
|
39
|
+
imageIndex: z.number().default(0),
|
|
40
|
+
imageSpeed: fixedNumber().default(1),
|
|
41
|
+
inheritedItemId: z.unknown().nullable().default(null),
|
|
42
|
+
frozen: z.boolean().default(false),
|
|
43
|
+
ignore: z.boolean().default(false),
|
|
44
|
+
inheritItemSettings: z.boolean().default(false),
|
|
45
|
+
/**
|
|
46
|
+
* Initial x-coords of the instance
|
|
47
|
+
*/
|
|
48
|
+
x: fixedNumber().default(0),
|
|
49
|
+
/**
|
|
50
|
+
* Initial y-coords of the instance
|
|
51
|
+
*/
|
|
52
|
+
y: fixedNumber().default(0),
|
|
53
|
+
resourceVersion: z.literal('1.0').default('1.0'),
|
|
54
|
+
tags: z.array(z.string()).optional(),
|
|
55
|
+
resourceType: z.literal('GMRInstance').default('GMRInstance'),
|
|
56
|
+
});
|
|
57
|
+
const yyRoomLayerBaseSchema = unstable({
|
|
58
|
+
visible: z.boolean().default(true),
|
|
59
|
+
effectEnabled: z.boolean().optional().default(true),
|
|
60
|
+
effectType: z.unknown().optional().default(null),
|
|
61
|
+
userdefinedDepth: z.boolean().default(false),
|
|
62
|
+
inheritLayerDepth: z.boolean().default(false),
|
|
63
|
+
inheritLayerSettings: z.boolean().default(false),
|
|
64
|
+
gridX: z.number().default(32),
|
|
65
|
+
gridY: z.number().default(32),
|
|
66
|
+
layers: z.array(z.unknown()).default([]),
|
|
67
|
+
hierarchyFrozen: z.boolean().default(false),
|
|
68
|
+
properties: z.array(z.unknown()).optional().default([]),
|
|
69
|
+
});
|
|
70
|
+
const yyRoomInstanceLayerSchema = yyRoomLayerBaseSchema.extend({
|
|
71
|
+
instances: z.array(yyRoomInstanceSchema).default([]),
|
|
72
|
+
depth: z.number().default(0),
|
|
73
|
+
resourceVersion: z.literal('1.0').default('1.0'),
|
|
74
|
+
/**
|
|
75
|
+
* @default "Instances"
|
|
76
|
+
*/
|
|
77
|
+
name: z.string().default('Instances'),
|
|
78
|
+
tags: z.array(z.string()).optional(),
|
|
79
|
+
resourceType: z.literal('GMRInstanceLayer'),
|
|
80
|
+
});
|
|
81
|
+
const yyRoomBackgroundLayerSchema = yyRoomLayerBaseSchema.extend({
|
|
82
|
+
spriteId: z.null().default(null),
|
|
83
|
+
colour: z.number().default(4278190080),
|
|
84
|
+
x: z.number().default(0),
|
|
85
|
+
y: z.number().default(0),
|
|
86
|
+
htiled: z.boolean().default(false),
|
|
87
|
+
vtiled: z.boolean().default(false),
|
|
88
|
+
hspeed: z.number().default(0),
|
|
89
|
+
vspeed: z.number().default(0),
|
|
90
|
+
stretch: z.boolean().default(false),
|
|
91
|
+
animationFPS: z.number().default(15),
|
|
92
|
+
animationSpeedType: z.number().default(0),
|
|
93
|
+
userdefinedAnimFPS: z.boolean().default(false),
|
|
94
|
+
depth: z.number().default(100),
|
|
95
|
+
properties: z.array(z.unknown()).optional(),
|
|
96
|
+
resourceVersion: z.literal('1.0').default('1.0'),
|
|
97
|
+
/**
|
|
98
|
+
* @default "Background"
|
|
99
|
+
*/
|
|
100
|
+
name: z.string().default('Background'),
|
|
101
|
+
tags: z.array(z.string()).optional(),
|
|
102
|
+
resourceType: z.literal('GMRBackgroundLayer'),
|
|
103
|
+
});
|
|
104
|
+
const yyRoomInstanceCreationOrderEntrySchema = z.object({
|
|
105
|
+
/**
|
|
106
|
+
* The *instance name*, which can be custom.
|
|
107
|
+
* Must match one of the YyRoomInstance names.
|
|
108
|
+
*/
|
|
109
|
+
name: z.string(),
|
|
110
|
+
/** The room's path */
|
|
111
|
+
path: z.string(),
|
|
112
|
+
});
|
|
113
|
+
const yyRoomLayerSchema = z.discriminatedUnion('resourceType', [
|
|
114
|
+
yyRoomInstanceLayerSchema,
|
|
115
|
+
yyRoomBackgroundLayerSchema,
|
|
116
|
+
]);
|
|
117
|
+
export const yyRoomSchema = yyBaseSchema.extend({
|
|
118
|
+
layers: z.array(yyRoomLayerSchema).default([]),
|
|
119
|
+
instanceCreationOrder: z
|
|
120
|
+
.array(yyRoomInstanceCreationOrderEntrySchema)
|
|
121
|
+
.default([]),
|
|
122
|
+
roomSettings: unstable({
|
|
123
|
+
inheritRoomSettings: z.boolean().default(false),
|
|
124
|
+
Width: z.number().default(1366),
|
|
125
|
+
Height: z.number().default(768),
|
|
126
|
+
persistent: z.boolean().default(false),
|
|
127
|
+
}).default({}),
|
|
128
|
+
viewSettings: unstable({
|
|
129
|
+
inheritViewSettings: z.boolean().default(false),
|
|
130
|
+
enableViews: z.boolean().default(false),
|
|
131
|
+
clearViewBackground: z.boolean().default(false),
|
|
132
|
+
clearDisplayBuffer: z.boolean().default(true),
|
|
133
|
+
}).default({}),
|
|
134
|
+
physicsSettings: unstable({
|
|
135
|
+
inheritPhysicsSettings: z.boolean().default(false),
|
|
136
|
+
PhysicsWorld: z.boolean().default(false),
|
|
137
|
+
PhysicsWorldGravityX: fixedNumber().default(0),
|
|
138
|
+
PhysicsWorldGravityY: fixedNumber().default(10),
|
|
139
|
+
PhysicsWorldPixToMetres: fixedNumber().default(0),
|
|
140
|
+
}).default({}),
|
|
141
|
+
isDnd: z.boolean().default(false),
|
|
142
|
+
volume: fixedNumber().default(10),
|
|
143
|
+
parentRoom: z.unknown().nullable().default(null),
|
|
144
|
+
/**
|
|
145
|
+
* 8 identical 'views' are created by default.
|
|
146
|
+
* @default []
|
|
147
|
+
*/
|
|
148
|
+
views: z.array(yyRoomViewSchema).default([]),
|
|
149
|
+
inheritLayers: z.boolean().default(false),
|
|
150
|
+
creationCodeFile: z.string().default("''"),
|
|
151
|
+
inheritCode: z.boolean().default(false),
|
|
152
|
+
inheritCreationOrder: z.boolean().default(false),
|
|
153
|
+
sequenceId: z.unknown().default(null),
|
|
154
|
+
resourceType: z.literal('GMRoom').default('GMRoom'),
|
|
155
|
+
});
|
|
156
156
|
//# sourceMappingURL=YyRoom.js.map
|
package/dist/types/YyScript.d.ts
CHANGED
|
@@ -1,48 +1,46 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export type YyScript = z.infer<typeof yyScriptSchema>;
|
|
3
|
-
export declare const yyScriptSchema: z.ZodObject<
|
|
4
|
-
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
name: string;
|
|
47
|
-
}>;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type YyScript = z.infer<typeof yyScriptSchema>;
|
|
3
|
+
export declare const yyScriptSchema: z.ZodObject<{
|
|
4
|
+
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
parent: z.ZodDefault<z.ZodObject<{
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
path: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
path: string;
|
|
12
|
+
name: string;
|
|
13
|
+
}, {
|
|
14
|
+
path: string;
|
|
15
|
+
name: string;
|
|
16
|
+
}>>;
|
|
17
|
+
resourceVersion: z.ZodDefault<z.ZodString>;
|
|
18
|
+
isDnD: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
isCompatibility: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
+
resourceType: z.ZodDefault<z.ZodLiteral<"GMScript">>;
|
|
21
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
22
|
+
name: string;
|
|
23
|
+
resourceType: "GMScript";
|
|
24
|
+
parent: {
|
|
25
|
+
path: string;
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
28
|
+
resourceVersion: string;
|
|
29
|
+
isDnD: boolean;
|
|
30
|
+
isCompatibility: boolean;
|
|
31
|
+
ConfigValues?: Record<string, Record<string, string>> | undefined;
|
|
32
|
+
tags?: string[] | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
name: string;
|
|
35
|
+
ConfigValues?: Record<string, Record<string, string>> | undefined;
|
|
36
|
+
tags?: string[] | undefined;
|
|
37
|
+
parent?: {
|
|
38
|
+
path: string;
|
|
39
|
+
name: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
resourceVersion?: string | undefined;
|
|
42
|
+
isDnD?: boolean | undefined;
|
|
43
|
+
isCompatibility?: boolean | undefined;
|
|
44
|
+
resourceType?: "GMScript" | undefined;
|
|
45
|
+
}>;
|
|
48
46
|
//# sourceMappingURL=YyScript.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YyScript.d.ts","sourceRoot":"","sources":["../../src/types/YyScript.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"YyScript.d.ts","sourceRoot":"","sources":["../../src/types/YyScript.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC"}
|
package/dist/types/YyScript.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Generated by ts-to-zod
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { yyBaseSchema } from './YyBase.js';
|
|
4
|
-
export const yyScriptSchema = yyBaseSchema.extend({
|
|
5
|
-
isDnD: z.boolean().default(false),
|
|
6
|
-
isCompatibility: z.boolean().default(false),
|
|
7
|
-
resourceType: z.literal('GMScript').default('GMScript'),
|
|
8
|
-
});
|
|
1
|
+
// Generated by ts-to-zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { yyBaseSchema } from './YyBase.js';
|
|
4
|
+
export const yyScriptSchema = yyBaseSchema.extend({
|
|
5
|
+
isDnD: z.boolean().default(false),
|
|
6
|
+
isCompatibility: z.boolean().default(false),
|
|
7
|
+
resourceType: z.literal('GMScript').default('GMScript'),
|
|
8
|
+
});
|
|
9
9
|
//# sourceMappingURL=YyScript.js.map
|