Right now there is no way for consumers of this library to extend the metadata property in SharedFormProperties because SharedFormProperties isn't exported from the library.
In doing this tools and apps that consume this library can define type hints for metadata that they use similar to how people extend the request object in Fastify or Express. (See an example here: https://github.com/fastify/help/issues/122#issuecomment-915263438)
Here is an example of what this would allow. Writing a .d.ts file like the following.
Right now there is no way for consumers of this library to extend the metadata property in
SharedFormProperties
becauseSharedFormProperties
isn't exported from the library.Current Type Definition
Proposed Change
Reasoning
In doing this tools and apps that consume this library can define type hints for metadata that they use similar to how people extend the request object in Fastify or Express. (See an example here: https://github.com/fastify/help/issues/122#issuecomment-915263438)
Here is an example of what this would allow. Writing a
.d.ts
file like the following.Results in type hints like this: