test: add SelfReferentialStruct test case
Adds a struct with a callback that references the same struct type.
Currently fails with "Maximum call stack size exceeded" due to infinite recursion in nitrogen's type walker.
Someone is attempting to deploy a commit to the Margelo Team on Vercel.
A member of the Team first needs to authorize it.
We need to add https://nitro.margelo.com/docs/types/custom-structs#cyclic-references-are-not-supported
For this case I expected it to be possible, or is it something you don't want to support:
export interface SelfReferentialStruct {
transform?: (config: SelfReferentialStruct) => Promise<SelfReferentialStruct>
}
Closing in favor of #1074 which includes this test case along with a fix