UNPKG

sc4

Version:

A command line utility for automating SimCity 4 modding tasks & modifying savegames

43 lines (42 loc) 1.79 kB
import type { ConditionalKeys, RequireAtLeastOne } from 'type-fest'; export type byte = number; export type uint8 = number; export type uint16 = number; export type uint32 = number; export type uint64 = bigint; export type sint8 = number; export type sint16 = number; export type sint32 = number; export type sint64 = bigint; export type float = number; export type double = number; export type word = uint16; export type dword = uint32; export type qword = uint64; export type TGILiteral<T extends uint32 = uint32, G extends uint32 = uint32, I extends uint32 = uint32> = { type: T; group: G; instance: I; }; export type TGIQuery<T extends uint32 = uint32, G extends uint32 = uint32, I extends uint32 = uint32> = RequireAtLeastOne<TGILiteral<T, G, I>>; export type TGIArray<T extends uint32 = uint32, G extends uint32 = uint32, I extends uint32 = uint32> = [type: T, group: G, instance: I]; export type TGILike<T extends uint32 = uint32, G extends uint32 = uint32, I extends uint32 = uint32> = TGILiteral<T, G, I> | TGIArray<T, G, I>; export type meters = float; export type tiles = byte; export type tracts = byte; export type ConstructorOptions<T> = Omit<Partial<T>, ConditionalKeys<T, (...args: any[]) => any>>; export type MinLengthArray<T, N extends number, R extends T[] = []> = R['length'] extends N ? [...R, ...T[]] : MinLengthArray<T, N, [T, ...R]>; export type Logger = { ok: (...args: any[]) => any; error: (...args: any[]) => any; warn: (...args: any[]) => any; info: (...args: any[]) => any; log: (...args: any[]) => any; progress: { start: (text?: string) => any; update: (text: string) => any; succeed: (text?: string) => any; fail: (text?: string) => any; warn: (text?: string) => any; }; };