You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We love the new CompositeTypes however if you have a property which is an unknown type it is output as unknown; rather then myfield: unknown;. I.e. it says the should be a property called "unknown" rater then typed as unknown.
To Reproduce
If you DB has something like:
CREATE TYPE public.example AS
(
id text,
foo text[]
);
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Describe the bug
We love the new
CompositeTypes
however if you have a property which is an unknown type it is output asunknown;
rather thenmyfield: unknown;
. I.e. it says the should be a property called "unknown" rater then typed as unknown.To Reproduce
If you DB has something like:
And you generate types you get:
Note I would also love a feature-request so that arrays preserve their type rather then being marked as unkown.
Expected behavior
A property with the correct name typed unknown; in-place of a property called "unknown" and implicitly typed any.
I believe the fix is to change line:
postgres-meta/src/server/templates/typescript.ts
Line 316 in 6dbc8f7
return `${JSON.stringify(name)}: unknown`
The text was updated successfully, but these errors were encountered: