agentleFS
forcedotcomforcedotcom/salesforcedx-vscode/.claude/skills/ts4023-effect-errors/SKILL.md

ts4023-effect-errors

Skill1k starsChanged 25 days agoBSD-3-ClauseView on GitHub

Fix TS4023 when an exported Effect's error channel names a TaggedError from another module. Use when tsc reports "has or is using name 'X' from external module but cannot be named".

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about forcedotcom/salesforcedx-vscode

The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 52

Talked about on GitHub and Stack Overflow (52 times).

On GitHub · 50

45 more on GitHub

The file

Files
SKILL.md

TS4023 with Effect Error Types

TS4023 = exported Effect .d.ts names an error from another module that did not export it. Typical: a services method error leaks into a consumer command.

Export only that class. Same-file, catchTag'd, or absent from an exported signature → leave unexported (OrgNotDeletableError, ToastActionError).

TS4023 message is misleading: cites Effect internals (Channel, Sink, Stream from effect/Cause), not the missing error.

Fix (defining module → consumer)

  1. Find unexported TaggedErrors in the defining package (usually services):
rg "class \w+Error extends (Data|Schema)\.TaggedError" packages/salesforcedx-vscode-services/src
  1. export the class that appears in the failing Effect's error channel:
export class EmptyComponentSetError extends Schema.TaggedError<EmptyComponentSetError>()('EmptyComponentSetError', {...}) {}
  1. Services public API — re-export from index.ts:
export type { EmptyComponentSetError } from './core/componentSetService';
  1. Compile the consumer that failed:
npm run compile -w packages/salesforcedx-vscode-metadata

Knip after a required same-package export

TS4023 required export in a non-services package, knip flags it unused → tag:

/** @ExportTaggedError */
export class NoFilesRetrievedError extends Schema.TaggedError<NoFilesRetrievedError>()('NoFilesRetrievedError', {
  message: Schema.String
}) {}

Knip unused on a TaggedError with no TS4023 → unexport; do not tag.

Services errors are imported by other packages; knip already sees them used. No @ExportTaggedError there (no-export-tagged-error-in-services).

Checklist

  • TS4023 actually reported
  • Export only the class in the exported Effect's error channel
  • Services: export type { ErrorName } from index.ts
  • Consumer compile passes
  • @ExportTaggedError only if knip flags that export unused (never in services)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.