Skip to content

feat: port lazy Promise Effect.sync diagnostic#139

Merged
mattiamanzati merged 1 commit intomainfrom
port-lazy-promise-effect-sync-0af7c0f
Apr 7, 2026
Merged

feat: port lazy Promise Effect.sync diagnostic#139
mattiamanzati merged 1 commit intomainfrom
port-lazy-promise-effect-sync-0af7c0f

Conversation

@mattiamanzati
Copy link
Copy Markdown
Contributor

Summary

  • port the upstream lazyPromiseInEffectSync diagnostic to the Go implementation and add a cached TypeParser.PromiseType helper
  • expose the needed TypeScriptGo checker shims so the rule uses the exact global Promise<T> reference check from the checker instead of assignability
  • add v3/v4 examples, baselines, generated metadata/schema/docs updates, and a changeset for the new diagnostic

TypeScript-only behavior

  • the upstream implementation adds a shared TypeScript promiseType parser; this PR ports that as a Go TypeParser.PromiseType helper backed by TypeScriptGo checker shims
  • exact Promise detection now uses checker-owned getGlobalPromiseTypeChecked, emptyGenericType, and isReferenceToType, which avoids widening to thenables or PromiseLike

Validation

  • pnpm setup-repo
  • pnpm lint
  • pnpm check
  • pnpm test

@mattiamanzati mattiamanzati merged commit 8e9578c into main Apr 7, 2026
4 checks passed
@mattiamanzati mattiamanzati deleted the port-lazy-promise-effect-sync-0af7c0f branch April 7, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant