chatmail / chatmail/yerpc

Typescript: Also allow undefined for `Option<T>`?

Open
#10 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
51
Forks
9
Avg merge
21m
Merged PRs (30d)
2

Description

currently its translated to `T | null`, which is not very convenient for functions with optional arguments.
actually it already accepts `undefined`, just the typescript types don't allow it yet.

example:
```js
// in js I can do:
await client.getChatlistEntries(3)
// but in ts I need to do this:
await client.getChatlistEntries(3, null, null, null)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.