zuke.tools.tsc

← Python API reference

@zuke/tsc 1.1.0: @zuke/tsc — typed tsc task wrappers for Zuke builds.

Symbols

#

TscBaseSettings

class
class TscBaseSettings(ToolSettings)

Shared base for tsc settings; resolves the tsc binary.

#

TscBuildSettings

class
class TscBuildSettings(TscBaseSettings)

Settings for a tsc --build project-references run.

  • projects(*values: str) -> Self

    Project config files or directories to build (positional); repeatable.

  • no_emit() -> Self

    Type-check without emitting output (--noEmit). tsc --build accepts the same compiler-option overrides as a plain compile, applied on top of each project's build; this is not inherited from TscBaseSettings — TscSettings.noEmit is a separate, unrelated field on the other subclass.

  • clean() -> Self

    Delete the outputs of all projects (--clean).

  • force() -> Self

    Build all projects, even those that appear up to date (--force).

  • dry() -> Self

    Show what would be built without building it (--dry).

  • watch() -> Self

    Rebuild projects on file changes (--watch).

  • verbose() -> Self

    Print verbose logging about the build (--verbose).

  • incremental() -> Self

    Reuse prior build information for faster rebuilds (--incremental).

#

TscSettings

class
class TscSettings(TscBaseSettings)

Settings for a standard tsc run.

  • paths(*values: str) -> Self

    Source files to compile (positional); repeatable.

  • project(path: str) -> Self

    Compile the project at the given config or directory (-p/--project).

  • no_emit() -> Self

    Type-check without emitting output (--noEmit).

  • out_dir(path: str) -> Self

    Directory for emitted files (--outDir).

  • declaration() -> Self

    Generate .d.ts declaration files (--declaration).

  • emit_declaration_only() -> Self

    Emit declarations only, no JavaScript (--emitDeclarationOnly).

  • incremental() -> Self

    Reuse prior build information for faster rebuilds (--incremental).

  • watch() -> Self

    Recompile on file changes (--watch).

  • strict() -> Self

    Enable all strict type-checking options (--strict).

  • pretty() -> Self

    Colourise and format diagnostics (--pretty).

  • list_files() -> Self

    Print the names of files included in the compilation (--listFiles).

  • skip_lib_check() -> Self

    Skip type-checking of declaration files (--skipLibCheck).

  • no_emit_on_error() -> Self

    Do not emit output if any errors are reported (--noEmitOnError).

  • target(value: str) -> Self

    Target ECMAScript version, e.g. es2022 (--target).

  • module(value: str) -> Self

    Module system, e.g. esnext, nodenext (--module).

#

TscTasks

class
class TscTasks

Typed task functions for the tsc TypeScript compiler.

  • static async tsc(ctx: ServiceContext, configure: Callable[[TscSettings], TscSettings] | None=None) -> ExecResult

    Type-check (or compile) with tsc.

  • static async build(ctx: ServiceContext, configure: Callable[[TscBuildSettings], TscBuildSettings] | None=None) -> ExecResult

    Run a project-references build with tsc --build.