Azure / Azure/azure-functions-durable-js

Support options object (interface) in function calls

Open
#143 0 comments 3 reactions 0 assignees View on GitHub
Enhancement
Dominant language
TypeScript
Stars
142
Forks
66
Avg merge
3d 19h
Merged PRs (30d)
4

Description

Some functions accept a lot of parameters. It might be more idiomatic in JS/TS to support options objects. Propose that we add the ability to accept an options interface in each function call. For instance:

```javascript
const restartResponse = yield context.df.callHttp("POST", uri, undefined, undefined, tokenSource);
```

Can have an "overload" that takes an `IDurableHttpRequest`:

```
const restartResponse = yield context.df.callHttp({
method: "POST",
uri,
tokenSource
});
```

This is able to take a [DurableHttpRequest](https://github.com/Azure/azure-functions-durable-js/blob/dev/src/durablehttprequest.ts) object as well.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing src/durablehttprequest.ts and the callHttp usage shown in the issue. Define the scope of the proposed options-object overloads across function calls and verify that each targeted API accepts the corresponding request shape; no tests or additional entry points are named in the issue.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.