feat(types): first example of typing#1
Open
buischiomassimo wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ciao @NicholasAntidormi ho buttato già la prima bozza per i tipi.
Ho usato le interfacce di typescript che mi permettono di renderli estensibili, e ho creato un type di base con
headerper tutte quelle informazioni di sistema e unbodydove poter inserire i dati utili. Ogni tipo estende sempre il il type Body e il type Base.Al momento ho creato un prodotto, un banner e un carosello.
Ora cerco di creare un'api per poter generare/gestire i tipi, proverò a fare entrambi gli esempi sia con una utils di function sia con delle classi.
Se teniamo buona questa struttura di dati, te già potresti riuscire a creare i componenti di front-end anche statici e all'ultimo proviamo a collegarli...
Fammi sapere cosa ne pensi.