-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recursive types with Omit types leads to Reference Type Not Set Yet error since v1.0.0 #1276
Comments
Huh, thanks for the issue. Could you try cloning this repo and do a binary search to identify the commit that causes the issue? There should be an associated pull request. |
I did the binary search as suggested and found the commit that causes the issue: 653fa77. And this is the associated pull request: #985. Before that, it works fine. We would love to upgrade to the latest ts-json-schema-generator version but this issue prevents it 😢 Do you have an idea what could be the issue? |
@joshkel could you take a look at this issue and whether it was introduced in your pull request? |
Even this simple case leads to issues export type Geometry = GeometryCollection;
export interface GeometryCollection<G extends Geometry = Geometry> {
geometries: G[];
}
export type Type = GeometryCollection; |
Actually this export interface GeoJsonObject {
type: GeometryCollection["type"];
}
export interface GeometryCollection extends GeoJsonObject {
type: "GeometryCollection";
}
export type Type = GeometryCollection; |
🚀 Issue was released in |
Hi there
First of all, thank you for maintaining this great library. I just found an issue, which only occurs in the most recent version v1.0.0. With v0.95, it worked without any problems. Here is an example of the issue:
The error says
Reference type not set yet
. I assume, it has something to do with the recursive type in combination with the union types andOmit<>
.The error does not occur when I remove the
Omit<Group, 'members'>
and replace it with an explicit type{ type: 'group' }
.Do you have any idea, what could be the root cause of this?
The text was updated successfully, but these errors were encountered: