-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Type safety - Incremental step 2 #26110
Conversation
jdl/converters/jdl-to-json/jdl-with-applications-to-json-converter.spec.ts
Show resolved
Hide resolved
relationshipSide?: RelationshipSide; | ||
relationshipName: string; | ||
relationshipType: RelationshipType; | ||
otherEntityName: string; | ||
options?: Record<string, boolean | string | number>; | ||
} & Record<string, any>; | ||
|
||
export type Entity = { | ||
export type JSONEntity = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused with this one: what's the difference with generators/base-application/types/entity.d.ts
? is it relevant that these converters/types
exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generators/base-application/types/entity.d.ts
have calculated values and supported annotations.
They are used in generators.
In jdl and json only base data and annotations of type Record<any, any>
exists.
jdl/models/jdl-application.ts
Outdated
@@ -24,12 +24,18 @@ import JDLApplicationConfigurationOption from './jdl-application-configuration-o | |||
import JDLApplicationConfiguration from './jdl-application-configuration.js'; | |||
import JDLApplicationEntities from './jdl-application-entities.js'; | |||
import JDLOptions from './jdl-options.js'; | |||
import AbstractJDLOption from './abstract-jdl-option.js'; | |||
|
|||
export type JDLJSONApplicationConfiguration = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same confusion about the relevance: shouldn't it be jdl/models/jdl-application.ts
. Is it worth splitting the business model and the JDLJson one?
More type safety on JDL
Related with #26114
Please make sure the below checklist is followed for Pull Requests.
When you are still working on the PR, consider converting it to Draft (below reviewers) and adding
skip-ci
label, you can still see CI build result at your branch.