Add interface to cover UpdateRecorderBase's "apply" method

Aperta
#16,003 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
cli, tooling

Direzione di ricerca

Inizia leggendo packages/angular_devkit/schematics/src/tree/host-tree.ts, recorder.ts e interface.ts, concentrandoti su HostTree.commitUpdate(...) e UpdateRecorderBase.apply(). Esamina l’utilizzo di schematics da parte del comando generate per comprendere il confine dell’API pubblica. Il lavoro è completato quando una nuova interfaccia di aggiornamento può essere utilizzata da commitUpdate(...) senza richiedere specificamente UpdateRecorderBase.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: @angular-devkit/schematics feature feature: insufficient votes

🚀 Feature request

Command (mark with an x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Description

Currently when writing schematics, the HostTree expects an UpdateRecorderBase for it's commitUpdate(...) function. This sharply limits creating custom schematic helpers, since any change needs to be done with an actual UpdateRecorderBase.

Describe the solution you'd like

Include a new UpdateRecord interface (however you want to call it) that outlines the UpdateRecorderBase's apply() function and remove the need for the UpdateRecorderBase specifically to be used with the HostTree.commitUpdate(...)

I have no problems cloning the repo and making the changes myself, but I would prefer some discussion around the subject to make sure it's in-line with the rest of the schematics implementations.

Describe alternatives you've considered

I looked into implementing my own TreeInterface, but the HostTree I would base it on uses a number of "backend" specific functionality that is not exported. Not to mention it would be incredibly tedious to re-implement this very basic class, when we are only trying to extend how an update occurs against the Tree.

Links

HostTree
UpdateRecorderBase
UpdateRecorder

Lingua principale
TypeScript
Stelle
27k
Fork
11.8k
Merge medio
16h 35m
PR unite (30g)
176

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di angular/angular-cli

Tutte le issue di angular/angular-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.