mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
1.1 KiB
1.1 KiB
Typescript migration
Introduce abstract
& override
- find all methods and getters that throw or are empty in base classes and turn into abstract method or if all methods are abstract, into an interface.
- change child impls to not call super.method and to add override
- don't allow implicit override in ts config
Use type
rather than interface
for named parameters and POJO return values.
type
and interface
can be used somewhat interchangebly used, but let's use type
to describe data and interface
to describe (polymorphic) behaviour.
Good examples of data are option objects to have named parameters, and POJO (plain old javascript objects) without any methods, just fields.
Also see this playground