sap.ui.model.Model.prototype.createBindingContext return type are wrong

Open
#379 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Compare the declared return type of sap.ui.model.Model.prototype.createBindingContext with the ClientModel return type mentioned in the issue. Trace the TypeScript declarations for both methods and verify the corrected type supports null checks; done means the base Model declaration matches the existing ClientModel behavior.

Written by the indexing model from the issue text.

Description

sap.ui.model.Model.prototype.createBindingContext says it returns a Context | undefined.

however the ClientModel already returns Context | null it seems :/

That's pretty annoying if you want to have proper null checks :)

Dominant language
TypeScript
Stars
213
Forks
35
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UI5/typescript

All issues in UI5/typescript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.