diff --git a/packages/common/src/context/index.ts b/packages/common/src/context/index.ts index c28b0258..d2a1c98b 100644 --- a/packages/common/src/context/index.ts +++ b/packages/common/src/context/index.ts @@ -1,2 +1,7 @@ export type { AppContext, AssetContext, Context, VarsContext } from "./context.type"; -export type { ClientRunOptions, InitContext, RunOptions } from "./init-context.type"; +export type { + ClientRunOptions, + InitContext, + RunOptions, + ServerRunOptions, +} from "./init-context.type"; diff --git a/packages/common/src/context/init-context.type.ts b/packages/common/src/context/init-context.type.ts index 796a4038..22e83a0a 100644 --- a/packages/common/src/context/init-context.type.ts +++ b/packages/common/src/context/init-context.type.ts @@ -31,6 +31,11 @@ export interface ClientRunOptions extends RunOptions { container: HTMLDivElement; } +/** + * Options a server application is started with. + */ +export interface ServerRunOptions extends RunOptions {} + /** * Narrow context available to a library's `__init` hook. * diff --git a/packages/core/src/application/nanoforge-server.ts b/packages/core/src/application/nanoforge-server.ts index fbac5f97..a7c996f6 100644 --- a/packages/core/src/application/nanoforge-server.ts +++ b/packages/core/src/application/nanoforge-server.ts @@ -1,4 +1,4 @@ -import type { RunOptions } from "@nanoforge-dev/common"; +import type { ServerRunOptions } from "@nanoforge-dev/common"; import { NanoforgeApplication } from "./nanoforge-application"; @@ -30,7 +30,7 @@ export class NanoforgeServer extends NanoforgeApplication { * @param options - Run options providing the canvas container, files map, and * environment variables. */ - public async init(options: RunOptions): Promise { + public async init(options: ServerRunOptions): Promise { await this.initialize(options); } }