Open ffMathy opened 1 month ago
I'm trying to get some answers internally about this about the people working closer to the data structures.
What I do know:
Project
and TypedContext
both inherit from Context
.
I'm not sure if children
of TypedContext
have a reason to be Context[]
, but I can't think of any examples where it's anything other than TypedContext[]
.
Alright. Can we figure it out? Where do we go from here?
I can't find any reason children of a TypedContext
couldn't be typed as TypedContext[]
. The reason for being Context[]
in the schema was probably to allow for new types of Context to be added in the future, but that didn't happen.
(Except Project, but they can't be children of TypedContext)
Making changes to the actual schema is hard because we don't want to break code relying on the schema, but for this, we could hard code that change when creating the TS schema.
I have lots of plans to contribute further to this project. I think to do that, I need to understand some fundamentals.
What is the difference between TypedContext and Context?
And should
children
of aTypedContext
also beTypedContext[]
instead ofContext[]
?