@sf-kmods/kdataforgejs 2026.4.16 → 2026.4.20
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/README.md +1 -1
- package/declarations.json +1 -1
- package/index.d.ts +208 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npm install --save-dev @sf-kmods/kdataforgejs
|
|
|
17
17
|
// DataForge/scripts/main.ts
|
|
18
18
|
import { defineHandler, defineMeta } from "@sf-kmods/kdataforgejs";
|
|
19
19
|
|
|
20
|
-
export const meta = defineMeta({ capabilities: ["kdf.
|
|
20
|
+
export const meta = defineMeta({ capabilities: ["kdf.items.define"] }); // optional
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
This package is **editor tooling only**. Packs never contain `package.json` or `node_modules`; the runtime resolves
|
package/declarations.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"package": "@sf-kmods/kdataforgejs",
|
|
4
4
|
"baseDeclaration": "@sf-kmods/kdataforgejs/index.d.ts",
|
|
5
5
|
"typeGenerator": {
|
|
6
|
-
"formatVersion":
|
|
6
|
+
"formatVersion": 9,
|
|
7
7
|
"outputPrefix": "typescript/kdataforgejs",
|
|
8
8
|
"generatedDeclaration": "typescript/kdataforgejs/kdataforge.generated.d.ts",
|
|
9
9
|
"artifacts": [
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ declare module "@sf-kmods/kdataforgejs" {
|
|
|
5
5
|
export interface CapabilityMap {
|
|
6
6
|
readonly "kdf.behavior.runtime": true;
|
|
7
7
|
readonly "kdf.classes.define": true;
|
|
8
|
+
readonly "kdf.conditions.evaluate": true;
|
|
9
|
+
readonly "kdf.config.read": true;
|
|
8
10
|
readonly "kdf.documents.apply": true;
|
|
9
11
|
readonly "kdf.imports.read": true;
|
|
10
12
|
readonly "kdf.items.define": true;
|
|
@@ -19,6 +21,7 @@ declare module "@sf-kmods/kdataforgejs" {
|
|
|
19
21
|
readonly "kdf.reflection.read": true;
|
|
20
22
|
readonly "kdf.reflection.write": true;
|
|
21
23
|
readonly "kdf.script.admin": true;
|
|
24
|
+
readonly "kdf.world.read": true;
|
|
22
25
|
}
|
|
23
26
|
export type Capability = keyof CapabilityMap & string;
|
|
24
27
|
export interface Meta { readonly capabilities: readonly Capability[]; }
|
|
@@ -164,7 +167,178 @@ declare module "@sf-kmods/kdataforgejs" {
|
|
|
164
167
|
export interface BehaviorRegistration { readonly id: string; }
|
|
165
168
|
export interface BehaviorInstance { readonly __kdfBehaviorInstance: never; }
|
|
166
169
|
export interface TickSubscription extends Subscription { }
|
|
167
|
-
export interface
|
|
170
|
+
export interface ModMeta {
|
|
171
|
+
readonly reference: string; readonly name: string; readonly version: string; readonly description: string;
|
|
172
|
+
readonly authors: string; readonly docsUrl: string; readonly supportUrl: string;
|
|
173
|
+
}
|
|
174
|
+
export interface PackMeta { readonly reference: string; readonly name: string; readonly version: string; readonly priority: number; }
|
|
175
|
+
export interface ConditionMap {
|
|
176
|
+
readonly gameVersion?: string;
|
|
177
|
+
readonly hasMod?: string | readonly string[];
|
|
178
|
+
readonly modVersion?: Readonly<Record<string, string>>;
|
|
179
|
+
readonly hasClass?: string | readonly string[];
|
|
180
|
+
readonly config?: string | readonly string[];
|
|
181
|
+
readonly ifNotMatch?: boolean;
|
|
182
|
+
}
|
|
183
|
+
export interface Conditions {
|
|
184
|
+
all(conditions: readonly boolean[]): boolean;
|
|
185
|
+
any(conditions: readonly boolean[]): boolean;
|
|
186
|
+
evaluate(conditions: ConditionMap | readonly ConditionMap[], behavior?: "AND" | "OR"): boolean;
|
|
187
|
+
}
|
|
188
|
+
export type ConfigScalar = boolean | number | bigint | string;
|
|
189
|
+
export type ConfigValue = ConfigScalar | readonly ConfigScalar[];
|
|
190
|
+
export interface ConfigValueMap { }
|
|
191
|
+
export interface ConfigChange<T = ConfigValue> { readonly id: string; readonly value: T; readonly previous: T; }
|
|
192
|
+
export interface PackConfig {
|
|
193
|
+
get<K extends keyof ConfigValueMap & string>(id: K): ConfigValueMap[K] | null;
|
|
194
|
+
get(id: string): ConfigValue | null;
|
|
195
|
+
onChange<K extends keyof ConfigValueMap & string>(id: K, callback: (change: ConfigChange<ConfigValueMap[K]>) => void): Subscription;
|
|
196
|
+
onChange(id: string, callback: (change: ConfigChange) => void): Subscription;
|
|
197
|
+
}
|
|
198
|
+
export interface ActorQuery { readonly limit?: number; readonly after?: string; }
|
|
199
|
+
export interface ActorPage<T extends UObject> { readonly actors: readonly T[]; readonly nextCursor: string | null; }
|
|
200
|
+
export type ActorChange<T extends UObject> = Readonly<{ kind: "added"; actor: T; path: string }> | Readonly<{ kind: "removed"; actor: null; path: string }>;
|
|
201
|
+
export interface ActorObservationOptions { readonly includeExisting?: boolean; }
|
|
202
|
+
export type Comparable = string | number | bigint;
|
|
203
|
+
export type Falsy = false | 0 | 0n | "" | null | undefined;
|
|
204
|
+
export type Truthy<T> = T extends Falsy ? never : T;
|
|
205
|
+
export type OmitKeys<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
206
|
+
export interface ArrayHelpers {
|
|
207
|
+
chunk<T>(values: readonly T[], size: number): T[][];
|
|
208
|
+
compact<T>(values: readonly T[]): Array<Truthy<T>>;
|
|
209
|
+
unique<T>(values: readonly T[]): T[];
|
|
210
|
+
uniqueBy<T, K>(values: readonly T[], select: (value: T, index: number) => K): T[];
|
|
211
|
+
groupBy<T, K extends PropertyKey>(values: readonly T[], select: (value: T, index: number) => K): Record<K, T[]>;
|
|
212
|
+
keyBy<T, K extends PropertyKey>(values: readonly T[], select: (value: T, index: number) => K): Record<K, T>;
|
|
213
|
+
partition<T>(values: readonly T[], predicate: (value: T, index: number) => unknown): [T[], T[]];
|
|
214
|
+
flatten<T>(values: readonly (T | readonly T[])[]): T[];
|
|
215
|
+
flattenDeep<T>(values: readonly unknown[]): T[];
|
|
216
|
+
first<T>(values: readonly T[]): T | undefined;
|
|
217
|
+
last<T>(values: readonly T[]): T | undefined;
|
|
218
|
+
initial<T>(values: readonly T[]): T[];
|
|
219
|
+
tail<T>(values: readonly T[]): T[];
|
|
220
|
+
take<T>(values: readonly T[], count: number): T[];
|
|
221
|
+
takeRight<T>(values: readonly T[], count: number): T[];
|
|
222
|
+
drop<T>(values: readonly T[], count: number): T[];
|
|
223
|
+
dropRight<T>(values: readonly T[], count: number): T[];
|
|
224
|
+
zip(...values: readonly (readonly unknown[])[]): unknown[][];
|
|
225
|
+
unzip<T>(values: readonly (readonly T[])[]): Array<Array<T | undefined>>;
|
|
226
|
+
rotate<T>(values: readonly T[], amount: number): T[];
|
|
227
|
+
difference<T>(values: readonly T[], excluded: readonly T[]): T[];
|
|
228
|
+
intersection<T>(values: readonly T[], other: readonly T[]): T[];
|
|
229
|
+
union<T>(...values: readonly (readonly T[])[]): T[];
|
|
230
|
+
sortBy<T, K extends Comparable>(values: readonly T[], select: (value: T, index: number) => K): T[];
|
|
231
|
+
minBy<T, K extends Comparable>(values: readonly T[], select: (value: T, index: number) => K): T | undefined;
|
|
232
|
+
maxBy<T, K extends Comparable>(values: readonly T[], select: (value: T, index: number) => K): T | undefined;
|
|
233
|
+
countBy<T, K extends PropertyKey>(values: readonly T[], select: (value: T, index: number) => K): Record<K, number>;
|
|
234
|
+
}
|
|
235
|
+
export interface StringHelpers {
|
|
236
|
+
capitalize(value: string): string; decapitalize(value: string): string; words(value: string): string[];
|
|
237
|
+
camelCase(value: string): string; pascalCase(value: string): string; kebabCase(value: string): string;
|
|
238
|
+
snakeCase(value: string): string; titleCase(value: string): string; slugify(value: string): string;
|
|
239
|
+
truncate(value: string, length: number, suffix?: string): string; padCenter(value: string, length: number, fill?: string): string;
|
|
240
|
+
reverse(value: string): string; countOccurrences(value: string, search: string): number;
|
|
241
|
+
removePrefix(value: string, prefix: string): string; removeSuffix(value: string, suffix: string): string;
|
|
242
|
+
ensurePrefix(value: string, prefix: string): string; ensureSuffix(value: string, suffix: string): string;
|
|
243
|
+
before(value: string, search: string): string; after(value: string, search: string): string;
|
|
244
|
+
between(value: string, start: string, end: string): string; lines(value: string): string[];
|
|
245
|
+
normalizeWhitespace(value: string): string; isBlank(value: string): boolean; escapeRegExp(value: string): string;
|
|
246
|
+
stripIndent(value: string): string;
|
|
247
|
+
}
|
|
248
|
+
export interface NumberHelpers {
|
|
249
|
+
clamp(value: number, minimum: number, maximum: number): number; lerp(start: number, end: number, alpha: number): number;
|
|
250
|
+
inverseLerp(start: number, end: number, value: number): number;
|
|
251
|
+
remap(value: number, sourceStart: number, sourceEnd: number, targetStart: number, targetEnd: number): number;
|
|
252
|
+
wrap(value: number, minimum: number, maximum: number): number; roundTo(value: number, step?: number): number;
|
|
253
|
+
floorTo(value: number, step?: number): number; ceilTo(value: number, step?: number): number;
|
|
254
|
+
sum(values: readonly number[]): number; average(values: readonly number[]): number | undefined;
|
|
255
|
+
median(values: readonly number[]): number | undefined; mode(values: readonly number[]): number | undefined;
|
|
256
|
+
min(values: readonly number[]): number | undefined; max(values: readonly number[]): number | undefined;
|
|
257
|
+
product(values: readonly number[]): number; percentage(value: number, total: number): number;
|
|
258
|
+
percentOf(percent: number, total: number): number; nearlyEqual(left: number, right: number, epsilon?: number): boolean;
|
|
259
|
+
signNonZero(value: number): -1 | 1; inRange(value: number, minimum: number, maximum: number, inclusive?: boolean): boolean;
|
|
260
|
+
}
|
|
261
|
+
export interface ObjectHelpers {
|
|
262
|
+
pick<T extends object, K extends keyof T>(value: T, keys: readonly K[]): Pick<T, K>;
|
|
263
|
+
omit<T extends object, K extends keyof T>(value: T, keys: readonly K[]): OmitKeys<T, K>;
|
|
264
|
+
mapValues<T extends object, R>(value: T, transform: (item: T[keyof T], key: string) => R): Record<string, R>;
|
|
265
|
+
mapKeys<T extends object, K extends PropertyKey>(value: T, transform: (key: string, item: T[keyof T]) => K): Record<K, T[keyof T]>;
|
|
266
|
+
filterEntries<T extends object>(value: T, predicate: (item: T[keyof T], key: string) => unknown): Partial<T>;
|
|
267
|
+
invert(value: Readonly<Record<string, PropertyKey>>): Record<PropertyKey, string>;
|
|
268
|
+
fromPairs<K extends PropertyKey, V>(pairs: Iterable<readonly [K, V]>): Record<K, V>;
|
|
269
|
+
toPairs<T extends object>(value: T): Array<[string, T[keyof T]]>;
|
|
270
|
+
mergeDefined<T extends object>(...values: readonly Partial<T>[]): Partial<T>;
|
|
271
|
+
getPath<T = unknown>(value: unknown, path: readonly PropertyKey[], fallback?: T): T | undefined;
|
|
272
|
+
hasPath(value: unknown, path: readonly PropertyKey[]): boolean;
|
|
273
|
+
setPath<T>(value: T, path: readonly PropertyKey[], nextValue: unknown): T;
|
|
274
|
+
deepFreeze<T>(value: T): Readonly<T>; isEmpty(value: object): boolean;
|
|
275
|
+
entriesSorted<T extends object>(value: T): Array<[string, T[keyof T]]>;
|
|
276
|
+
}
|
|
277
|
+
export interface GuardHelpers {
|
|
278
|
+
isDefined<T>(value: T | undefined): value is T; isNil(value: unknown): value is null | undefined;
|
|
279
|
+
isBoolean(value: unknown): value is boolean; isNumber(value: unknown): value is number;
|
|
280
|
+
isFiniteNumber(value: unknown): value is number; isInteger(value: unknown): value is number;
|
|
281
|
+
isSafeInteger(value: unknown): value is number; isBigInt(value: unknown): value is bigint;
|
|
282
|
+
isString(value: unknown): value is string; isNonEmptyString(value: unknown): value is string;
|
|
283
|
+
isArray(value: unknown): value is unknown[]; isObject(value: unknown): value is object;
|
|
284
|
+
isPlainObject(value: unknown): value is Record<PropertyKey, unknown>; isFunction(value: unknown): value is Function;
|
|
285
|
+
isPromiseLike<T = unknown>(value: unknown): value is PromiseLike<T>; isIterable<T = unknown>(value: unknown): value is Iterable<T>;
|
|
286
|
+
isMap(value: unknown): value is Map<unknown, unknown>; isSet(value: unknown): value is Set<unknown>;
|
|
287
|
+
assertDefined<T>(value: T | null | undefined, message?: string): T; assertNever(value: never, message?: string): never;
|
|
288
|
+
}
|
|
289
|
+
export interface CollectionHelpers {
|
|
290
|
+
getOrCreate<K, V>(map: Map<K, V>, key: K, create: (key: K) => V): V;
|
|
291
|
+
mapMap<K, V, RK, RV>(map: Map<K, V>, transform: (value: V, key: K) => readonly [RK, RV]): Map<RK, RV>;
|
|
292
|
+
filterMap<K, V>(map: Map<K, V>, predicate: (value: V, key: K) => unknown): Map<K, V>;
|
|
293
|
+
mapSet<T, R>(set: Set<T>, transform: (value: T) => R): Set<R>;
|
|
294
|
+
filterSet<T>(set: Set<T>, predicate: (value: T) => unknown): Set<T>;
|
|
295
|
+
toggleSet<T>(set: Set<T>, value: T, force?: boolean): boolean;
|
|
296
|
+
addToMapSet<K, V>(map: Map<K, Set<V>>, key: K, value: V): Set<V>;
|
|
297
|
+
removeFromMapSet<K, V>(map: Map<K, Set<V>>, key: K, value: V): boolean;
|
|
298
|
+
frequency<T>(values: Iterable<T>): Map<T, number>; hasDuplicates<T>(values: Iterable<T>): boolean;
|
|
299
|
+
}
|
|
300
|
+
export interface FunctionHelpers {
|
|
301
|
+
identity<T>(value: T): T; constant<T>(value: T): () => T; noop(): void;
|
|
302
|
+
tap<T>(value: T, effect: (value: T) => void): T; negate<A extends readonly unknown[]>(predicate: (...args: A) => unknown): (...args: A) => boolean;
|
|
303
|
+
once<A extends readonly unknown[], R>(callback: (...args: A) => R): (...args: A) => R;
|
|
304
|
+
memoize<A extends readonly unknown[], K, R>(callback: (...args: A) => R, selectKey?: (...args: A) => K): (...args: A) => R;
|
|
305
|
+
pipe<A, B>(first: (value: A) => B): (value: A) => B;
|
|
306
|
+
pipe<A, B, C>(first: (value: A) => B, second: (value: B) => C): (value: A) => C;
|
|
307
|
+
pipe<A, B, C, D>(first: (value: A) => B, second: (value: B) => C, third: (value: C) => D): (value: A) => D;
|
|
308
|
+
compose<A, B>(first: (value: A) => B): (value: A) => B;
|
|
309
|
+
compose<A, B, C>(second: (value: B) => C, first: (value: A) => B): (value: A) => C;
|
|
310
|
+
compose<A, B, C, D>(third: (value: C) => D, second: (value: B) => C, first: (value: A) => B): (value: A) => D;
|
|
311
|
+
times<T>(count: number, callback: (index: number) => T): T[];
|
|
312
|
+
tryOr<T>(callback: () => T, fallback: T | ((error: unknown) => T)): T;
|
|
313
|
+
}
|
|
314
|
+
export interface SemVer {
|
|
315
|
+
readonly major: number; readonly minor: number; readonly patch: number;
|
|
316
|
+
readonly prerelease: readonly (string | number)[]; readonly build: readonly string[];
|
|
317
|
+
}
|
|
318
|
+
export type SemVerInput = string | SemVer;
|
|
319
|
+
export type SemVerRelease = "major" | "minor" | "patch" | "prerelease";
|
|
320
|
+
/** Semantic Versioning 2.0 with npm-style ranges: `^`, `~`, `>=`, `1.x`, `1.2 - 1.4`, `||`, space for AND. */
|
|
321
|
+
export interface SemVerHelpers {
|
|
322
|
+
parse(value: string): SemVer | null;
|
|
323
|
+
create(major: number, minor?: number, patch?: number, prerelease?: readonly (string | number)[], build?: readonly string[]): SemVer;
|
|
324
|
+
format(version: SemVerInput): string; isValid(value: unknown): boolean; coerce(value: unknown): SemVer | null;
|
|
325
|
+
compare(left: SemVerInput, right: SemVerInput): -1 | 0 | 1;
|
|
326
|
+
eq(left: SemVerInput, right: SemVerInput): boolean; neq(left: SemVerInput, right: SemVerInput): boolean;
|
|
327
|
+
gt(left: SemVerInput, right: SemVerInput): boolean; gte(left: SemVerInput, right: SemVerInput): boolean;
|
|
328
|
+
lt(left: SemVerInput, right: SemVerInput): boolean; lte(left: SemVerInput, right: SemVerInput): boolean;
|
|
329
|
+
satisfies(version: SemVerInput, range: string): boolean;
|
|
330
|
+
maxSatisfying<T extends SemVerInput>(versions: readonly T[], range: string): T | undefined;
|
|
331
|
+
sort<T extends SemVerInput>(versions: readonly T[]): T[];
|
|
332
|
+
inc(version: SemVerInput, release: SemVerRelease): SemVer;
|
|
333
|
+
}
|
|
334
|
+
export const arrays: Readonly<ArrayHelpers>;
|
|
335
|
+
export const strings: Readonly<StringHelpers>;
|
|
336
|
+
export const numbers: Readonly<NumberHelpers>;
|
|
337
|
+
export const objects: Readonly<ObjectHelpers>;
|
|
338
|
+
export const guards: Readonly<GuardHelpers>;
|
|
339
|
+
export const collections: Readonly<CollectionHelpers>;
|
|
340
|
+
export const functions: Readonly<FunctionHelpers>;
|
|
341
|
+
export const semver: Readonly<SemVerHelpers>;
|
|
168
342
|
/** Canonical descriptor identity. `id` names authored content; `classPath` names an existing soft class path. */
|
|
169
343
|
export type ItemReference = Readonly<{ id: string }> | Readonly<{ classPath: string }>;
|
|
170
344
|
export interface LocalizedText { readonly namespace: string; readonly key: string; readonly source: string; }
|
|
@@ -244,6 +418,18 @@ declare module "@sf-kmods/kdataforgejs" {
|
|
|
244
418
|
/** Frozen context supplied to default main. Every member below is installed by KDFJSRuntime. */
|
|
245
419
|
export interface Context {
|
|
246
420
|
readonly catalog: () => Catalog;
|
|
421
|
+
/** Lowercase MD5 digest of UTF-8 text. */
|
|
422
|
+
readonly md5: (text: string) => string;
|
|
423
|
+
/** Lowercase SHA-1 digest of UTF-8 text. */
|
|
424
|
+
readonly sha1: (text: string) => string;
|
|
425
|
+
/** Lowercase SHA-256 digest of UTF-8 text. */
|
|
426
|
+
readonly sha256: (text: string) => string;
|
|
427
|
+
/** Eight-character lowercase CRC-32 digest of UTF-8 text. */
|
|
428
|
+
readonly crc32: (text: string) => string;
|
|
429
|
+
/** Random UUID in lowercase RFC 4122 hyphenated form. */
|
|
430
|
+
readonly uuid: () => string;
|
|
431
|
+
readonly createCleanupBag: () => CleanupBag;
|
|
432
|
+
readonly isValid: (value: Target | null | undefined) => boolean;
|
|
247
433
|
readonly target: { (): Realm; (name: "realm"): Realm; };
|
|
248
434
|
readonly getClass: {
|
|
249
435
|
<C extends Class<UObject>, P extends NativeClassPathFor<C>>(type: C, path: P, options: CheckedLookupOptions): C;
|
|
@@ -264,6 +450,9 @@ declare module "@sf-kmods/kdataforgejs" {
|
|
|
264
450
|
<C extends Class<UObject>>(type: C, value: UObject, options?: LookupOptions): ClassValue<C> | null;
|
|
265
451
|
};
|
|
266
452
|
readonly findClasses: <C extends Class<UObject>>(type: C, search?: ClassSearchParams) => readonly C[];
|
|
453
|
+
readonly config: PackConfig;
|
|
454
|
+
readonly findActors: <C extends Class<UObject>>(type: C, query?: ActorQuery) => ActorPage<ClassValue<C>>;
|
|
455
|
+
readonly observeActors: <C extends Class<UObject>>(type: C, callback: (change: ActorChange<ClassValue<C>>) => void, options?: ActorObservationOptions) => Subscription;
|
|
267
456
|
readonly createItem: <C extends Class<UObject> = Class<UObject>>(definition: ItemDefinition<C>) => ContentRef<"item">;
|
|
268
457
|
readonly updateItem: <C extends Class<UObject> = Class<UObject>>(definition: ItemDefinition<C>) => ContentRef<"item">;
|
|
269
458
|
readonly removeItem: (id: string) => ContentRef<"item">;
|
|
@@ -275,6 +464,17 @@ declare module "@sf-kmods/kdataforgejs" {
|
|
|
275
464
|
readonly import: (kind: "text" | "yaml" | "binary" | "image" | "audio", path: string) => StructuredValue;
|
|
276
465
|
readonly compare: (left: InputValue, operator: CompareOperator, right: InputValue) => boolean;
|
|
277
466
|
readonly isAuthority: () => boolean;
|
|
467
|
+
/** True when SML loaded the mod. With `range` (same syntax as the `modVersion` condition, e.g. `^3.12.0`) its version must match too. */
|
|
468
|
+
readonly isModLoaded: (reference: string, range?: string) => boolean;
|
|
469
|
+
/** Metadata of a loaded mod, or `null` when it is not loaded. */
|
|
470
|
+
readonly getModMeta: (reference: string) => ModMeta | null;
|
|
471
|
+
readonly listMods: () => readonly ModMeta[];
|
|
472
|
+
/** True when the KDataForge pack takes part in the current load. With `range` its pack.yml version must match too. */
|
|
473
|
+
readonly isPackLoaded: (reference: string, range?: string) => boolean;
|
|
474
|
+
readonly getPackMeta: (reference: string) => PackMeta | null;
|
|
475
|
+
readonly listPacks: () => readonly PackMeta[];
|
|
476
|
+
/** Game build number, the value `gameVersion:` conditions compare. */
|
|
477
|
+
readonly gameVersion: () => number;
|
|
278
478
|
readonly conditions: Conditions;
|
|
279
479
|
readonly on: {
|
|
280
480
|
(target: Target, eventId: string, callback: PositionalEventCallback): Subscription;
|
|
@@ -314,8 +514,15 @@ declare module "@sf-kmods/kdataforgejs" {
|
|
|
314
514
|
readonly unregisterTick: (key: string) => void;
|
|
315
515
|
readonly setTimeout: (callback: () => void, seconds: number) => Subscription;
|
|
316
516
|
readonly clearTimeout: (handle: Subscription) => void;
|
|
517
|
+
readonly setInterval: (callback: () => void, seconds: number) => Subscription;
|
|
518
|
+
readonly clearInterval: (handle: Subscription) => void;
|
|
317
519
|
readonly log: (...data: readonly unknown[]) => void; readonly info: (...data: readonly unknown[]) => void;
|
|
318
520
|
readonly warn: (...data: readonly unknown[]) => void; readonly error: (...data: readonly unknown[]) => void;
|
|
319
521
|
readonly debug: (...data: readonly unknown[]) => void;
|
|
320
522
|
}
|
|
523
|
+
|
|
524
|
+
export interface CleanupBag {
|
|
525
|
+
readonly add: (cleanup: () => void) => void;
|
|
526
|
+
readonly dispose: () => void;
|
|
527
|
+
}
|
|
321
528
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sf-kmods/kdataforgejs",
|
|
3
|
-
"version": "2026.4.
|
|
3
|
+
"version": "2026.4.20",
|
|
4
4
|
"description": "TypeScript types for KDataForgeJS packs: declarations of the built-in @sf-kmods/kdataforgejs module plus a strict tsconfig base.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Kyri123/Kyrium",
|