Skip to content

Conversation

@viktorsperling
Copy link
Collaborator

Adds the necessary typing for the bindList API of the JSONModel, to the TypedJSONModel.

* let path: PathInPerson = "/name"; // ok
* path = "/firstName"; // error
*/
export type AbsoluteListBindingPath<Type> = {

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?

Copy link
Contributor

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

Copy link

@pksinsik pksinsik left a 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>>(
Copy link
Contributor

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<
Copy link
Contributor

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> = {
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants