Generated channel client fails noUnusedLocals without hooks
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- elixir, typescript
- Ambito
- build-system, tooling
Direzione di ricerca
Start by locating the generator code that emits executeActionChannelPush and the Channel import; the issue does not name their files, so search the repository for those generated strings. Reproduce with the empty manifest and the exposed-action case, then type-check the generated files with noUnusedLocals: true. Done means both cases compile without TS6133 diagnostics and codegen --check still passes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Code of Conduct
- I agree to follow this project's Code of Conduct
AI Policy
- I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.
Versions
ash_typescript 0.19.3; TypeScript 7.0.2 and 6.0.3 (reproduced with both); Phoenix JS 1.8.16; @types/phoenix 1.6.8; Elixir 1.20.4; OTP 29.1.1
Operating system
Debian 12 (bookworm) x86_64
Current Behavior
Without channel hooks, generated executeActionChannelPush declares processedConfig but never uses it:
TS6133: 'processedConfig' is declared but its value is never read.
This occurs with an exposed action. An empty RPC manifest additionally produces an unused Channel import.
Reproduction
The smallest case uses an empty manifest:
defmodule MyApp.TypescriptManifest do
use AshTypescript.Manifest, otp_app: :my_app, domains: []
end
Configure generation without before/after channel hooks:
config :ash_typescript,
manifest: MyApp.TypescriptManifest,
output_file: "../web/src/lib/generated/ash_rpc.ts",
run_endpoint: "/rpc/run",
validate_endpoint: "/rpc/validate",
generate_phx_channel_rpc_actions: true,
generate_validation_functions: false
Run mix ash_typescript.codegen, then type-check the generated files in a Phoenix TypeScript project with noUnusedLocals: true.
Both processedConfig and Channel produce TS6133 errors. A separate manifest exposing one action still produces the processedConfig error.
Both generated outputs pass codegen --check; that confirms generator provenance, not TypeScript compilation success. noUnusedParameters produces no additional diagnostics.
Expected Behavior
Omit unused declarations/imports so generated clients pass noUnusedLocals without manual edits or unnecessary hooks.
- Lingua principale
- Elixir
- Stelle
- 103
- Fork
- 36
- Merge medio
- 1m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ash-project/ash_typescript
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
ash-project/ash_typescript#114 · 1 commento ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
ash-project/ash_typescript#103 · 2 commenti ·
-
Control generation of custom typesForse di nuovo libera @jmac03 l’ha presa 52 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
ash-project/ash_typescript#84 · 1 commento ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
ash-project/ash_typescript#51 · 2 commenti · 3 reazioni ·
Tutte le issue di ash-project/ash_typescript
Issue simili
-
@swmansion/popcorn: published .d.ts files lack extensions on relative imports, breaking moduleResolution node16/nodenextForse già presa @Huyvux12 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
software-mansion/popcorn#929 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
ash-project/ash#3127 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
intellij-elixir/intellij-elixir#4705 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug: Table layout and date column are cut off on mobile screens on the Tournaments -> History pageApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
hexlet-codebattle/codebattle#2375 ·
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
wintermeyer/vutuv#2388 ·
I maintainer di solito rispondono entro 1 giorno