Open tahini opened 5 months ago
@tahini Could you provide an example?
InterviewPathFunction
c'est la même chose que ParsingFunction<T>
. Beaucoup des types du genre { fr: bla, en: bla }
sont en fait des I18nData
(qui inclut des parsingFunction), etc. Avant, ces types étaient génériques et donc difficile d'utiliser dans le générateur, mais maintenant, ça peut presque être du find & replace!
Also the SectionConfig
and SectionConfigs
from the generator (in sectionsTypes.ts) should be replaced with SurveySection
and SurveySections
in interview.ts (evolution-frontend), once the main type is updated. In the generator, it types more fields, but the main one uses some ParsingFunction type where necessary.
To extend this issue, I think it's not just the types that need to be in main evolution packages, but everything that is code in the generator.
The generator should be a dev
package, used to generate the survey, but once generated, there should be no imports from evolution-generator
, everything used should be in the evolution-common and evolution-frontend packages.
To extend this issue, I think it's not just the types that need to be in main evolution packages, but everything that is code in the generator.
The generator should be a
dev
package, used to generate the survey, but once generated, there should be no imports fromevolution-generator
, everything used should be in the evolution-common and evolution-frontend packages.
@tahini After giving it some thought, I'm on board with this. Do you want to open an issue on this?
So evolution-generator will only be the python scripts.
With #531 the types in the main evolution packages are not generic anymore, so it can be easier for the generator types to use those, as some of the main types are more complete than the generator ones.