fix: types errors

This commit is contained in:
DIYgod
2023-03-22 20:01:05 +00:00
parent d58afff5b9
commit 0d91e9077b
5 changed files with 23 additions and 14 deletions
+5 -4
View File
@@ -13,7 +13,8 @@ test-results/
.idea
.vscode
sw.js
sw.js.map
workbox-*.js
workbox-*.js.map
public/sw.js
public/sw.js.map
public/workbox-*.js
public/workbox-*.js.map
public/worker-*.js
-5
View File
@@ -1,5 +0,0 @@
/******/ (() => { // webpackBootstrap
var __webpack_exports__ = {};
self.__WB_DISABLE_DEV_LOGS = true;
/******/ })()
;
+6 -4
View File
@@ -511,10 +511,12 @@ export default function SubdomainEditor() {
date.dayjs,
)}
onChange={(e: ChangeEvent<HTMLInputElement>) => {
const value = date
.inLocalTimezone(e.target.value)
.toISOString()
updateValue("publishedAt", value)
try {
const value = date
.inLocalTimezone(e.target.value)
.toISOString()
updateValue("publishedAt", value)
} catch (error) {}
}}
help={t(
`This ${
+2 -1
View File
@@ -17,7 +17,8 @@
"allowJs": true,
"skipLibCheck": true,
"incremental": true,
"module": "esnext"
"module": "esnext",
"typeRoots": ["./types"]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
+10
View File
@@ -0,0 +1,10 @@
export {}
declare global {
interface Array<T> {
findLastIndex(
predicate: (value: T, index: number, obj: T[]) => unknown,
thisArg?: any,
): number
}
}