equinor / equinor/fusion-framework

context: decide whether `undefined` should remain a valid ContextClient/ContextItem state

Open
#5,116 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10
Forks
10
Avg merge
19h 40m
Merged PRs (30d)
150

Description

`ContextClient`'s class-level TSDoc has an open design question:

```ts
/**
* ...
* @todo - should this have `undefined` as a valid value?
*/
export class ContextClient extends Observable {
```

`ContextClient` (and `currentContext`) currently allows `ContextItem | null | undefined` as valid states. Decide whether `undefined` should remain a valid emitted/settable value (e.g. meaning "not yet initialized") or whether the API should be simplified to only `ContextItem | null`.

_Originally flagged as an `@todo` comment while resolving fusion-lint warnings on `fix/sematic-lint`._

Contributor guide

Open the contributing guide

Research direction

Start by reading the ContextClient declaration and the currentContext API referenced in the issue, including their surrounding TSDoc and type usage. Determine whether undefined represents a necessary uninitialized state; done means the decision is documented and the ContextClient/currentContext contract consistently reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.