Fix StartOS 0.4 TypeScript packaging to match SDK API

This commit is contained in:
MacPro
2026-04-09 15:10:44 -05:00
parent 68ec875ee7
commit 8298c083c7
3436 changed files with 867051 additions and 92 deletions
@@ -0,0 +1,36 @@
import { Effects } from '../../../base/lib/Effects';
import { Manifest, PackageId } from '../../../base/lib/osBindings';
export declare class GetServiceManifest<Mapped = Manifest> {
readonly effects: Effects;
readonly packageId: PackageId;
readonly map: (manifest: Manifest | null) => Mapped;
readonly eq: (a: Mapped, b: Mapped) => boolean;
constructor(effects: Effects, packageId: PackageId, map: (manifest: Manifest | null) => Mapped, eq: (a: Mapped, b: Mapped) => boolean);
/**
* Returns the manifest of a service. Reruns the context from which it has been called if the underlying value changes
*/
const(): Promise<Mapped>;
/**
* Returns the manifest of a service. Does nothing if it changes
*/
once(): Promise<Mapped>;
private watchGen;
/**
* Watches the manifest of a service. Returns an async iterator that yields whenever the value changes
*/
watch(abort?: AbortSignal): AsyncGenerator<Mapped, never, unknown>;
/**
* Watches the manifest of a service. Takes a custom callback function to run whenever it changes
*/
onChange(callback: (value: Mapped | null, error?: Error) => {
cancel: boolean;
} | Promise<{
cancel: boolean;
}>): void;
/**
* Watches the manifest of a service. Returns when the predicate is true
*/
waitFor(pred: (value: Mapped) => boolean): Promise<Mapped>;
}
export declare function getServiceManifest(effects: Effects, packageId: PackageId): GetServiceManifest<Manifest>;
export declare function getServiceManifest<Mapped>(effects: Effects, packageId: PackageId, map: (manifest: Manifest | null) => Mapped, eq?: (a: Mapped, b: Mapped) => boolean): GetServiceManifest<Mapped>;