-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial work on layer-based design for docgen (#11)
- Loading branch information
Showing
31 changed files
with
1,560 additions
and
904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@effect/docgen": minor | ||
--- | ||
|
||
swap internals to a layer-based design |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"exclude": ["src/internal_effect_untraced/**/*.ts"], | ||
"theme": "mikearnaldi/just-the-docs", | ||
"parseCompilerOptions": { | ||
"strict": true, | ||
"noEmit": true, | ||
"target": "ES2021", | ||
"lib": ["ES2021"], | ||
"paths": { | ||
"@effect/docgen": ["./src/index.ts"], | ||
"@effect/docgen/test/*": ["./test/*"], | ||
"@effect/docgen/examples/*": ["./examples/*"], | ||
"@effect/docgen/*": ["./src/*"] | ||
} | ||
}, | ||
"examplesCompilerOptions": { | ||
"strict": true, | ||
"noEmit": true, | ||
"target": "ES2021", | ||
"lib": ["ES2021"], | ||
"paths": { | ||
"@effect/docgen": ["../../src/index.ts"], | ||
"@effect/docgen/test/*": ["../../test/*"], | ||
"@effect/docgen/examples/*": ["../../examples/*"], | ||
"@effect/docgen/*": ["../../src/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
--- | ||
title: ChildProcess.ts | ||
nav_order: 2 | ||
parent: Modules | ||
--- | ||
|
||
## ChildProcess overview | ||
|
||
Added in v1.0.0 | ||
|
||
--- | ||
|
||
<h2 class="text-delta">Table of contents</h2> | ||
|
||
- [constructors](#constructors) | ||
- [ExecutionError](#executionerror) | ||
- [SpawnError](#spawnerror) | ||
- [model](#model) | ||
- [ChildProcess (interface)](#childprocess-interface) | ||
- [ExecutionError (interface)](#executionerror-interface) | ||
- [SpawnError (interface)](#spawnerror-interface) | ||
- [service](#service) | ||
- [ChildProcess](#childprocess) | ||
- [ChildProcessLive](#childprocesslive) | ||
|
||
--- | ||
|
||
# constructors | ||
|
||
## ExecutionError | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const ExecutionError: Data.Case.Constructor<ExecutionError, '_tag'> | ||
``` | ||
Added in v1.0.0 | ||
## SpawnError | ||
**Signature** | ||
```ts | ||
export declare const SpawnError: Data.Case.Constructor<SpawnError, '_tag'> | ||
``` | ||
Added in v1.0.0 | ||
# model | ||
## ChildProcess (interface) | ||
Represents an entity that is capable of spawning child processes. | ||
**Signature** | ||
````ts | ||
export interface ChildProcess { | ||
/** | ||
* Executes a command like: | ||
* | ||
* ```sh | ||
* ts-node docs/examples/index.ts | ||
* ``` | ||
* | ||
* where `command = ts-node` and `executable = docs/examples/index.ts` | ||
*/ | ||
spawn(command: string, executable: string): Effect.Effect<never, ExecutionError | SpawnError, void> | ||
} | ||
```` | ||
Added in v1.0.0 | ||
## ExecutionError (interface) | ||
Represents an error that occurs within a child process during execution. | ||
**Signature** | ||
```ts | ||
export interface ExecutionError extends Data.Case { | ||
readonly _tag: 'ExecutionError' | ||
readonly command: string | ||
readonly stderr: string | ||
} | ||
``` | ||
|
||
Added in v1.0.0 | ||
|
||
## SpawnError (interface) | ||
|
||
Represents an error that occurs when trying to spawn a child process. | ||
|
||
**Signature** | ||
|
||
```ts | ||
export interface SpawnError extends Data.Case { | ||
readonly _tag: 'SpawnError' | ||
readonly command: string | ||
readonly args: ReadonlyArray<string> | ||
readonly error: Error | ||
} | ||
``` | ||
|
||
Added in v1.0.0 | ||
|
||
# service | ||
|
||
## ChildProcess | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const ChildProcess: Context.Tag<ChildProcess, ChildProcess> | ||
``` | ||
Added in v1.0.0 | ||
## ChildProcessLive | ||
**Signature** | ||
```ts | ||
export declare const ChildProcessLive: Layer.Layer<never, never, ChildProcess> | ||
``` | ||
Added in v1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,96 @@ | ||
--- | ||
title: Config.ts | ||
nav_order: 2 | ||
nav_order: 3 | ||
parent: Modules | ||
--- | ||
|
||
## Config overview | ||
|
||
Added in v0.9.0 | ||
Added in v1.0.0 | ||
|
||
--- | ||
|
||
<h2 class="text-delta">Table of contents</h2> | ||
|
||
- [Config](#config) | ||
- [constructors](#constructors) | ||
- [ConfigError](#configerror) | ||
- [model](#model) | ||
- [Config (interface)](#config-interface) | ||
- [utils](#utils) | ||
- [getConfig](#getconfig) | ||
- [ConfigError (interface)](#configerror-interface) | ||
- [service](#service) | ||
- [Config](#config) | ||
- [ConfigLive](#configlive) | ||
|
||
--- | ||
|
||
# Config | ||
# constructors | ||
|
||
## ConfigError | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const ConfigError: Data.Case.Constructor<ConfigError, '_tag'> | ||
``` | ||
Added in v1.0.0 | ||
# model | ||
## Config (interface) | ||
**Signature** | ||
```ts | ||
export interface Config extends Schema.To<typeof ConfigSchema> { | ||
export interface Config { | ||
readonly projectName: string | ||
readonly projectHomepage: string | ||
readonly srcDir: string | ||
readonly outDir: string | ||
readonly theme: string | ||
readonly enableSearch: boolean | ||
readonly enforceDescriptions: boolean | ||
readonly enforceExamples: boolean | ||
readonly enforceVersion: boolean | ||
readonly exclude: ReadonlyArray<string> | ||
readonly parseCompilerOptions: Record<string, unknown> | ||
readonly examplesCompilerOptions: Record<string, unknown> | ||
} | ||
``` | ||
|
||
Added in v0.9.0 | ||
Added in v1.0.0 | ||
|
||
## ConfigError (interface) | ||
|
||
**Signature** | ||
|
||
```ts | ||
export interface ConfigError extends Data.Case { | ||
readonly _tag: 'ConfigError' | ||
readonly message: string | ||
} | ||
``` | ||
|
||
Added in v1.0.0 | ||
|
||
# service | ||
|
||
## Config | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const Config: Context.Tag<Config, Config> | ||
``` | ||
# utils | ||
Added in v1.0.0 | ||
## getConfig | ||
## ConfigLive | ||
**Signature** | ||
```ts | ||
export declare const getConfig: Effect.Effect<never, Error, Service.Config> | ||
export declare const ConfigLive: Layer.Layer<unknown, unknown, Config> | ||
``` | ||
Added in v0.9.0 | ||
Added in v1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,63 @@ | ||
--- | ||
title: Core.ts | ||
nav_order: 3 | ||
nav_order: 4 | ||
parent: Modules | ||
--- | ||
|
||
## Core overview | ||
|
||
Added in v0.9.0 | ||
Added in v1.0.0 | ||
|
||
--- | ||
|
||
<h2 class="text-delta">Table of contents</h2> | ||
|
||
- [constructors](#constructors) | ||
- [ParseError](#parseerror) | ||
- [main](#main) | ||
- [main](#main-1) | ||
- [model](#model) | ||
- [ParseError (interface)](#parseerror-interface) | ||
|
||
--- | ||
|
||
# constructors | ||
|
||
## ParseError | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const ParseError: Data.Case.Constructor<ParseError, '_tag'> | ||
``` | ||
Added in v1.0.0 | ||
# main | ||
## main | ||
**Signature** | ||
```ts | ||
export declare const main: Effect.Effect<never, Error, void> | ||
export declare const main: Effect.Effect<never, never, void> | ||
``` | ||
Added in v1.0.0 | ||
# model | ||
## ParseError (interface) | ||
Represents errors that occurred during parsing of TypeScript source files. | ||
**Signature** | ||
```ts | ||
export interface ParseError extends Data.Case { | ||
readonly _tag: 'ParseError' | ||
readonly message: string | ||
} | ||
``` | ||
|
||
Added in v0.9.0 | ||
Added in v1.0.0 |
Oops, something went wrong.