-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
55 lines (49 loc) · 1.68 KB
/
index.ts
File metadata and controls
55 lines (49 loc) · 1.68 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* @module Effect/Environment
* @description
* Environment service for platform detection and environment setup.
* Provides detection of platform, architecture, locale, and other environment settings.
*
* @see {@link Effect/Environment/Interface/EnvironmentService} Service interface
* @see {@link Effect/Environment/Implementation/EnvironmentImplementation} Live implementation
* @see {@link Effect/Environment/Tag/EnvironmentTag} Service tag
* @category Service
* @example
* ```typescript
* import { EnvironmentLive, EnvironmentTag } from "./Effect/Environment/index.js";
* import { Effect } from "effect";
*
* const program = Effect.gen(function* () {
* const env = yield* EnvironmentTag;
* const info = yield* env.getInfo;
* console.log("Platform:", info.platform);
* });
*
* Effect.runPromise(program.pipe(Effect.provide(EnvironmentLive)));
* ```
*/
// ============================================================================
// Re-exports from atomic modules
// ============================================================================
// Types
export type { Platform, Architecture } from "./Type/EnvironmentType.js";
export type { EnvironmentInfo } from "./Type/EnvironmentType.js";
// Interface
export type { EnvironmentService } from "./Interface/EnvironmentService.js";
// Tag
export { EnvironmentTag } from "./Tag/EnvironmentTag.js";
// Implementation
export {
EnvironmentLive as default,
EnvironmentLive,
EnvironmentMock,
makeMockEnvironment,
} from "./Implementation/EnvironmentImplementation.js";
// Helpers
export {
DetectPlatform,
DetectArchitecture,
DetectLocale,
DetectTimezone,
GetUserAgent,
} from "./Implementation/EnvironmentHelper.js";