@hyperfrontend/workspace/executors/typechecktypecheck
Runs the TypeScript compiler over a project without emitting files: its library configuration and, when the project has one, its spec configuration. Specs run with their types stripped, so this is the one step that type checks them.
{
"typecheck": {
"executor": "@hyperfrontend/workspace:typecheck"
}
}
| Option | What it does |
|---|---|
--tsConfig | The library configuration; defaults to tsconfig.lib.json in the project |
--specTsConfig | The spec configuration; defaults to tsconfig.spec.json in the project, checked when it exists |
API Reference§
ƒ Functions
§functiontypecheckExecutor(
typecheckExecutor( options: TypecheckExecutorOptions, context: ExecutorContext): Promise< ExecutorResult>
Typecheck executor for the projects of a workspace.
Runs the TypeScript compiler in --noEmit mode over the library config and, when the project has one, the spec config. Specs run with their types stripped, so this is the only step that type checks them.
Runs the TypeScript compiler in --noEmit mode over the library config and, when the project has one, the spec config. Specs run with their types stripped, so this is the only step that type checks them.
Parameters
| Name | Type | Description |
|---|---|---|
§options | TypecheckExecutorOptions | Executor options including the tsconfig paths |
§context | ExecutorContext | The workspace, the project and the target the task runs on |
Returns
Promise< ExecutorResult>An object indicating success or failure of the type check
Example
A `typecheck` target with the default configurations
{
"targets": {
"typecheck": { "executor": "@hyperfrontend/workspace:typecheck" }
}
}
```
`npx hf run lib-core:typecheck` checks `libs/core/tsconfig.lib.json`, then `libs/core/tsconfig.spec.json` when that file exists; `--tsConfig=libs/core/tsconfig.json` names another.◈ Interfaces
Schema types for the typecheck executor.
Properties
§
tsConfig?:stringPath to the library TypeScript configuration file, relative to the workspace root. Defaults to {projectRoot}/tsconfig.lib.json.§
specTsConfig?:stringPath to the spec TypeScript configuration file, relative to the workspace root. Defaults to {projectRoot}/tsconfig.spec.json, checked when that file exists.