-
Notifications
You must be signed in to change notification settings - Fork 32
feat(dts-generator): add bindList declarations and tests to TypedJSONModel #538
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
base: main
Are you sure you want to change the base?
Conversation
…d tests to TypedJSONModel This reverts commit ae4ba2e.
| * let path: PathInPerson = "/name"; // ok | ||
| * path = "/firstName"; // error | ||
| */ | ||
| export type AbsoluteListBindingPath<Type> = { |
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.
ListByAbsoluteBindingPath würde doch eher der bestehende Namensgebung (PropertyByABP, ...) entsprechen?
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.
Ich verstehe das anders. PopertyByAbsoluteBindingPath bestimmt den type des Rückgabewertes z.B. bei getProperty. Path und context parameter einer Funktion haben die hier angewandte Namenskonvention
pksinsik
left a comment
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.
s. code comment
| mParameters?: object, | ||
| ): JSONListBinding; | ||
| // Overload for relative paths | ||
| bindList<Root extends AbsoluteBindingPath<Data>, Path extends RelativeListBindingPath<Data, Root>>( |
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.
bitte erst Path, dann Root so wie bei allen overloads
| mParameters?: object, | ||
| ): JSONListBinding; | ||
| // Implementation | ||
| bindList< |
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.
path und root in eine zeile hinter bindList
| * let path: PathInPerson = "/name"; // ok | ||
| * path = "/firstName"; // error | ||
| */ | ||
| export type AbsoluteListBindingPath<Type> = { |
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.
Ich verstehe das anders. PopertyByAbsoluteBindingPath bestimmt den type des Rückgabewertes z.B. bei getProperty. Path und context parameter einer Funktion haben die hier angewandte Namenskonvention
Adds the necessary typing for the
bindListAPI of the JSONModel, to the TypedJSONModel.