You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Explain unsafe coerce
This commit is contained in:
@@ -77,7 +77,8 @@ export default class QueryMatcher<T extends Object> {
|
|||||||
for (const object of objects) {
|
for (const object of objects) {
|
||||||
// Need to use unsafe coerce here because the objects can have any
|
// Need to use unsafe coerce here because the objects can have any
|
||||||
// type for their values. We assume that those values who's keys have
|
// type for their values. We assume that those values who's keys have
|
||||||
// been specified will be string.
|
// been specified will be string. Also, we cannot infer all the
|
||||||
|
// types of the keys of the objects at compile.
|
||||||
const keyValues: (string)[] = _at<T>(object as any, this._keys) as any;
|
const keyValues: (string)[] = _at<T>(object as any, this._keys) as any;
|
||||||
|
|
||||||
for (const f of this._funcs) {
|
for (const f of this._funcs) {
|
||||||
|
|||||||
Reference in New Issue
Block a user