migrate index.js to typescript
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import uaParser from 'ua-parser-js';
|
||||
|
||||
function isMobileDevice() {
|
||||
function isMobileDevice(): boolean {
|
||||
if (!navigator.userAgent) {
|
||||
return false;
|
||||
}
|
||||
@@ -20,8 +20,8 @@ function isMobileDevice() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function navigate(type) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
function navigate(type: string): void {
|
||||
if (__EZBOOKKEEPING_IS_PRODUCTION__) {
|
||||
window.location.replace(`${type}/`);
|
||||
} else {
|
||||
window.location.replace(`${type}.html`);
|
||||
+1
-1
@@ -66,6 +66,6 @@
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
|
||||
<script type="module" src="./index-main.js"></script>
|
||||
<script type="module" src="./index-main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user