JaimeGensler / thyseus

An archetypal Entity Component System, built entirely in Typescript
MIT License
74 stars 3 forks source link

[FEAT] [BRK] Simplify parameter map #86

Closed JaimeGensler closed 9 months ago

JaimeGensler commented 9 months ago

Describe the problem this feature solves

Using custom parameters with the transformer right now is tedious, as you have to provide an absolute import path. As the global import doesn't exist anymore, it'd be nicer to just assume the parameter type is in scope. We also don't need to map names anymore as we're introducing the notion of pass-thru parameters (like Readonly<T>).

New parameter map can just be a Record<string, boolean>, where the key is the name of the type to recognize, and boolean is if we pass act on it (true for most, false for pass-thru).

This will significantly improve the ergonomics of custom system parameters with the transformer