s2cfgtojson 3.0.0 → 3.0.1
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/package.json +1 -1
- package/types.mts +2 -21
package/package.json
CHANGED
package/types.mts
CHANGED
|
@@ -66,6 +66,7 @@ import {
|
|
|
66
66
|
ERequiredSquadMembers,
|
|
67
67
|
EMeshSubType,
|
|
68
68
|
} from "./enums.mjs";
|
|
69
|
+
import { Struct } from "./Struct.mjs";
|
|
69
70
|
|
|
70
71
|
export type Internal = "__internal__";
|
|
71
72
|
export type IStruct = {
|
|
@@ -84,28 +85,8 @@ export interface DefaultEntries {
|
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
export type Value = string | boolean | number;
|
|
87
|
-
|
|
88
88
|
export type Entries = Record<string | number, Value>;
|
|
89
|
-
|
|
90
|
-
export type GetTsType<E extends IStruct> = {
|
|
91
|
-
[key in Exclude<keyof E, Internal>]: E[key] extends IStruct
|
|
92
|
-
? GetTsType<E[key]>
|
|
93
|
-
: E[key];
|
|
94
|
-
};
|
|
95
|
-
type RKey<In> = Exclude<keyof In, keyof DefaultEntries>;
|
|
96
|
-
|
|
97
|
-
export type GetStructType<In> =
|
|
98
|
-
In extends Array<any>
|
|
99
|
-
? IStruct & { [key in number]: GetStructType<In[key]> }
|
|
100
|
-
: In extends Record<any, any>
|
|
101
|
-
? IStruct & { [key in RKey<In>]: GetStructType<In[key]> }
|
|
102
|
-
: In extends string
|
|
103
|
-
? In
|
|
104
|
-
: In extends number
|
|
105
|
-
? number
|
|
106
|
-
: In extends boolean
|
|
107
|
-
? boolean
|
|
108
|
-
: never;
|
|
89
|
+
export type GetStructType<In> = Struct & In;
|
|
109
90
|
|
|
110
91
|
export type ArmorPrototype = GetStructType<{
|
|
111
92
|
SID: string;
|