Configure ts

This commit is contained in:
Sakura Knoll
2021-12-20 05:14:23 +09:00 Unverified
parent 3585f53757
commit d3367463b3
4 changed files with 15 additions and 29 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
import fs from 'fs'
import { readdirSync, readJsonFileSync, resolvePathname } from '../../lib/data'
import { readdirSync, readJsonFileSync } from '../../lib/data'
export interface BattlesuitSkill {
name: string
+8 -12
View File
@@ -1,11 +1,5 @@
import {
NavLink,
Box,
Card,
Heading,
Text,
Paragraph,
} from '@theme-ui/components'
import { NavLink, Box, Heading, Text, Paragraph } from '@theme-ui/components'
import { NextPageContext } from 'next'
import Link from 'next/link'
import React from 'react'
import {
@@ -101,16 +95,18 @@ const StigmataListPage = ({
export default StigmataListPage
export async function getStaticProps(ctx) {
const stigmataData = getStigmataById(ctx.params.stigmataId)
export async function getStaticProps(
ctx: NextPageContext & { params: { stigmataId: string } }
) {
const stigmataData = getStigmataById(ctx.params.stigmataId)!
return {
props: {
stigmataData: stigmataData,
stigmataSetList: getStigmataListBySetId(stigmataData.set).sort(
stigmataSetList: (getStigmataListBySetId(stigmataData.set!) || []).sort(
(a, b) => -a.type.localeCompare(b.type)
),
stigmataSet: getStigmataSetBySetId(stigmataData.set) || null,
stigmataSet: getStigmataSetBySetId(stigmataData.set!) || null,
},
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
/** @jsxImportSource theme-ui */
import { Text, NavLink, Box, Heading, Flex, Link } from '@theme-ui/components'
import { Text, Box, Heading, Flex, Link } from '@theme-ui/components'
import NextLink from 'next/link'
import Breadcrumb from '../../../components/organisms/Breadcrumb'
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
+5 -14
View File
@@ -1,14 +1,11 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"strict": true,
"noUnusedLocals": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
@@ -19,12 +16,6 @@
"isolatedModules": true,
"jsx": "preserve"
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}