Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve typing #2352

Merged
merged 9 commits into from
May 9, 2022
Merged

Improve typing #2352

merged 9 commits into from
May 9, 2022

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented May 9, 2022

Fixes #2351


This change is marked as an internal change (Task), so will not be included in the changelog.

@t3chguy t3chguy added the T-Task Tasks for the team like planning label May 9, 2022
@t3chguy t3chguy requested a review from a team as a code owner May 9, 2022 08:15
@t3chguy t3chguy changed the title Fix typing of the store interface Improve typign May 9, 2022
@t3chguy t3chguy changed the title Improve typign Improve typing May 9, 2022
Copy link
Contributor

@kerryarchibald kerryarchibald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbkr
Copy link
Member

dbkr commented May 9, 2022

merging because this fixes the issue I was having with ts-ifying element-call and I want the change :)

@dbkr dbkr merged commit 706b4d6 into develop May 9, 2022
@dbkr dbkr deleted the t3chguy/cypress-threads branch May 9, 2022 10:58
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import request from "request";
import * as request from "request";
Copy link

@andrevmatos andrevmatos May 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke our Node client. request here now is an object containing get, post, etc, instead of a function.
Repro:

const { getRequest } = require('matrix-js-sdk'); // notice we're importing from index.js, as expected
typeof getRequest(); // gives `object`, instead of `function`, as before

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the transpiler helper _interopRequireWildcard converts the function to object

dbkr added a commit that referenced this pull request Jun 29, 2022
Regressed by #2352
(you can just use RTCStatsReport as an iterator directly (which
was was what that code was doing before) which uses entries(
which gives you key/value pairs, but using forEach gives you just
the value.
dbkr added a commit that referenced this pull request Jun 29, 2022
Regressed by #2352
(you can just use RTCStatsReport as an iterator directly (which
was was what that code was doing before) which uses entries(
which gives you key/value pairs, but using forEach gives you just
the value.
dbkr added a commit that referenced this pull request Jun 29, 2022
Regressed by #2352
(you can just use RTCStatsReport as an iterator directly (which
was was what that code was doing before) which uses entries(
which gives you key/value pairs, but using forEach gives you just
the value.
dbkr added a commit that referenced this pull request Jul 12, 2022
* Send call version `1` as a string (#2471)

* test typescriptification - backup.spec (#2468)

* renamed:    spec/unit/crypto/crypto-utils.js -> spec/unit/crypto/crypto-utils.ts

* ts fixes in crypto-utils

* renamed:    spec/unit/crypto/backup.spec.js -> spec/unit/crypto/backup.spec.ts

* ts fixes in backup.spec

* remove fit

* remove debug

* Prepare changelog for v19.0.0-rc.1

* v19.0.0-rc.1

* Update jest monorepo (#2476)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all (#2475)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @types/jest to v28 (#2478)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix call.collectCallStats() (#2480)

Regressed by #2352
(you can just use RTCStatsReport as an iterator directly (which
was was what that code was doing before) which uses entries(
which gives you key/value pairs, but using forEach gives you just
the value.

* Go back to forEach in collectcallstats (#2481)

Older typescript library doesn't know about .values() on the stats
object, so it was failing in react sdk which had an older typescript.
matrix-org/matrix-react-sdk#8935 was an
attempt to upgrade it but did not seem to be helping on CI, despite
being fine locally.

* Update babel monorepo to v7.18.6 (#2477)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Expose KNOWN_SAFE_ROOM_VERSION (#2474)

* Fix return type on funcs in matrixClient to be optionally null (#2488)

* Update pull_request.yaml (#2490)

* Lock file maintenance (#2491)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Prepare changelog for v19.0.0

* v19.0.0

* Resetting package fields for development

* Improve VoIP integrations testing (#2495)

* Remove MSC3244 support (#2504)

* Actually store the identity server in the client when given as an option (#2503)

* Actually store the identity server in the client when given as an option

* Update requestRegisterEmailToken to a modern spec version too

* Properly re-insert room ID in bundled thread relation messages from sync (#2505)

Events returned by the `/sync` endpoint, including relations bundled with other events, may have their `room_id`s stripped out. This causes decryption errors if the IDs aren't repopulated.

Fixes element-hq/element-web#22094.

* Remove `setNow` from `realtime-callbacks.ts` (#2509)

Signed-off-by: Šimon Brandner <[email protected]>

* Remove dead code (#2510)

* Don't crash with undefined room in `processBeaconEvents()` (#2500)

* Add a basic PR checklist for all PRs (#2511)

It'll be mildly annoying for core developers who have to constantly remove or edit this, but it'll also serve as a good reminder to do these things.

Note that signoff is not required for core developers.

* Fix tests

Co-authored-by: Šimon Brandner <[email protected]>
Co-authored-by: Kerry <[email protected]>
Co-authored-by: RiotRobot <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Weimann <[email protected]>
Co-authored-by: texuf <[email protected]>
Co-authored-by: Michael Telatynski <[email protected]>
Co-authored-by: Travis Ralston <[email protected]>
Co-authored-by: Faye Duxovni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overriding of setTimeout makes js-sdk import order-dependent
4 participants