-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.context.ts
More file actions
41 lines (34 loc) · 1.16 KB
/
init.context.ts
File metadata and controls
41 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { type IConfigRegistry, type LibraryManager } from "../../../library";
import { type IRunClientOptions, type IRunOptions } from "../../../options";
import { type ApplicationContext } from "../application.context";
import { BaseContext } from "./base.context";
export class InitContext extends BaseContext {
private readonly _canvas: IRunClientOptions["canvas"] | undefined;
private readonly _files: IRunOptions["files"];
private readonly _env: Record<string, string | undefined>;
private readonly _config: IConfigRegistry;
constructor(
context: ApplicationContext,
libraryManager: LibraryManager,
configRegistry: IConfigRegistry,
options: IRunOptions,
) {
super(context, libraryManager);
this._canvas = (options as IRunClientOptions)["canvas"];
this._files = options.files;
this._env = options.env;
this._config = configRegistry;
}
get canvas(): IRunClientOptions["canvas"] | undefined {
return this._canvas;
}
get files(): IRunOptions["files"] {
return this._files;
}
get env(): Record<string, string | undefined> {
return this._env;
}
get config(): IConfigRegistry {
return this._config;
}
}