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 } from '../../lib/data'
import { readdirSync, readJsonFileSync, resolvePathname } from '../../lib/data'
export interface BattlesuitSkill { export interface BattlesuitSkill {
name: string name: string
+8 -12
View File
@@ -1,11 +1,5 @@
import { import { NavLink, Box, Heading, Text, Paragraph } from '@theme-ui/components'
NavLink, import { NextPageContext } from 'next'
Box,
Card,
Heading,
Text,
Paragraph,
} from '@theme-ui/components'
import Link from 'next/link' import Link from 'next/link'
import React from 'react' import React from 'react'
import { import {
@@ -101,16 +95,18 @@ const StigmataListPage = ({
export default StigmataListPage export default StigmataListPage
export async function getStaticProps(ctx) { export async function getStaticProps(
const stigmataData = getStigmataById(ctx.params.stigmataId) ctx: NextPageContext & { params: { stigmataId: string } }
) {
const stigmataData = getStigmataById(ctx.params.stigmataId)!
return { return {
props: { props: {
stigmataData: stigmataData, stigmataData: stigmataData,
stigmataSetList: getStigmataListBySetId(stigmataData.set).sort( stigmataSetList: (getStigmataListBySetId(stigmataData.set!) || []).sort(
(a, b) => -a.type.localeCompare(b.type) (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 */ /** @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 NextLink from 'next/link'
import Breadcrumb from '../../../components/organisms/Breadcrumb' import Breadcrumb from '../../../components/organisms/Breadcrumb'
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator' import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
+5 -14
View File
@@ -1,14 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"lib": [ "lib": ["dom", "dom.iterable", "esnext"],
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": false, "strict": true,
"noUnusedLocals": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"noEmit": true, "noEmit": true,
"incremental": true, "incremental": true,
@@ -19,12 +16,6 @@
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve" "jsx": "preserve"
}, },
"include": [ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"next-env.d.ts", "exclude": ["node_modules"]
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
} }