I have a project that has a Python (django) backend and a (mostly) Vue frontend. I render forms with Django html templates instead of Vue, but would like to migrate the forms so that everything frontend is Vue.
I want to implement some sort of type checking system that could throw linting errors if I try to create object properties in the frontend that don't match the form data object that exists in the backend. However, I have no idea how to do this given I'm going from Python to Javascript - or if it's even possible to typecheck a JS object from a Python class.
I've seen this in Typescript + React, where the props object used to persist the controlled form's state is typed with the backend object. That way, if you tried to add a property to the object in the frontend that wasn't included in the backend model, you'd immediately get a linting error. But that works bc you're working in the same language. Any ideas on how to do this between languages? Maybe an intermediate step with a script to build JS models from the Python classes?