Switch things to typescript, use @types/modernizr, fix global.d.ts. Move mobile_guide redirect to index.ts

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-04-05 00:55:36 +01:00
parent 093b7bbf72
commit b1575524aa
8 changed files with 92 additions and 72 deletions

View file

@ -14,12 +14,22 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
type ReactNode = import("react").ReactNode;
import {ReactNode} from "react";
import "modernizr";
interface Window {
Olm: {
init: () => Promise<void>;
};
mxSendRageshake: (text: string, withLogs?: boolean) => void;
matrixChat: ReactNode;
declare global {
interface Window {
Modernizr: ModernizrAPI & FeatureDetects;
Olm: {
init: () => Promise<void>;
};
mxSendRageshake: (text: string, withLogs?: boolean) => void;
matrixChat: ReactNode;
}
// workaround for https://github.com/microsoft/TypeScript/issues/30933
interface ObjectConstructor {
fromEntries?(xs: [string|number|symbol, any][]): object
}
}