File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
-
17
- import { EitherAnd } from "matrix-events-sdk" ;
18
-
19
16
import { UnstableValue } from "../NamespacedValue.ts" ;
20
17
import { IMessageRendering } from "./extensible_events.ts" ;
21
18
@@ -52,12 +49,17 @@ export const M_TOPIC = new UnstableValue("m.topic", "org.matrix.msc3765.topic");
52
49
*/
53
50
export type MTopicContent = IMessageRendering [ ] ;
54
51
52
+ type MTopicStable = { [ M_TOPIC . altName ] : MTopicContent } ;
53
+ type MTopicUnstable = { [ M_TOPIC . name ] : MTopicContent } ;
54
+
55
55
/**
56
56
* The event definition for an m.topic event (in content)
57
57
*/
58
- export type MTopicEvent = EitherAnd < { [ M_TOPIC . name ] : MTopicContent } , { [ M_TOPIC . altName ] : MTopicContent } > ;
58
+ export type MTopicEvent = ( MTopicStable & MTopicUnstable ) | MTopicStable | MTopicUnstable ;
59
59
60
60
/**
61
61
* The event content for an m.room.topic event
62
62
*/
63
- export type MRoomTopicEventContent = { topic : string | null | undefined } & ( MTopicEvent | { } ) ;
63
+ export type MRoomTopicEventContent = {
64
+ topic : string | null | undefined ;
65
+ } & Partial < MTopicEvent > ;
You can’t perform that action at this time.
0 commit comments