ts4023-effect-errors

Export non-exported TaggedError classes to resolve TS4023 errors in Effect-based functions.

1.0k|453|Updated Jun 21, 2017
One-click install
npx skills add https://github.com/forcedotcom/salesforcedx-vscode --skill ts4023-effect-errors
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ts4023-effect-errors
Source: https://github.com/forcedotcom/salesforcedx-vscode/tree/main/.claude/skills/ts4023-effect-errors
Command: npx skills add https://github.com/forcedotcom/salesforcedx-vscode --skill ts4023-effect-errors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Fix TS4023 export errors when exporting function that returns Effect-based types. TypeScript reports error types in Effect's error channel not exported from the source, causing TS4023.

Core Features & Use Cases

  • Identify all TaggedError classes (including non-exported ones) that appear in Effect error channels.
  • Update source files to export non-exported error classes and re-export them from index.ts.
  • Validate changes by running TypeScript builds to ensure declarations are emitted correctly.
  • Use case: maintainers resolve TS4023 when publishing packages that expose Effect-based APIs.

Quick Start

Run the fix by locating all non-exported TaggedError classes used in Effect error channels, export them, re-export via index.ts, and verify with a TypeScript build.

Frequently Asked Questions about ts4023-effect-errors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix TS4023 export errors in TypeScript Effect functions?▼

Fix TS4023 export errors by identifying non-exported TaggedError classes in Effect error channels, exporting them from source files, re-exporting via index.ts, and validating with TypeScript compilation.

Why does TypeScript report TS4023 when exporting Effect-based APIs?▼

TypeScript reports TS4023 because error types in Effect's error channel are not exported from the source file, so the compiler cannot emit declarations for the public API.

How do I export non-exported TaggedError classes in an Effect service?▼

Locate all non-exported TaggedError classes used in Effect error channels, add the export keyword to their class definitions, and re-export them from index.ts to expose them publicly.

Do I need to export all error types used in Effect error channels to fix TS4023?▼

Yes, you must export all TaggedError classes used in Effect error channels and re-export them through index.ts so TypeScript can correctly generate declaration files during compilation.

What's the best way to validate TS4023 fixes for Effect exports?▼

Run a TypeScript build after exporting and re-exporting the TaggedError classes to verify that declarations are emitted correctly and the TS4023 errors are fully resolved.