mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 04:09:12 +00:00
[misc]: typescript-y changes for compat
This commit is contained in:
parent
af7fd76bb9
commit
b90bb5c2ed
4 changed files with 26 additions and 3 deletions
5
packages/roleypoly-ui/connector.d.ts
vendored
Normal file
5
packages/roleypoly-ui/connector.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
import Next, { DevServer } from 'next'
|
||||
|
||||
declare module '@roleypoly/ui/connector' {
|
||||
export default function (opts: { dev: boolean }): DevServer
|
||||
}
|
13
packages/roleypoly-ui/mappings.d.ts
vendored
Normal file
13
packages/roleypoly-ui/mappings.d.ts
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
declare module '@roleypoly/ui/mappings' {
|
||||
export type Mappings = {
|
||||
[newPath: string]: {
|
||||
path: string,
|
||||
custom?: (router: { get: (ctx: any) => void }) => void,
|
||||
noAutoFix?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
const mappings: Mappings
|
||||
|
||||
export default mappings
|
||||
}
|
|
@ -1,10 +1,12 @@
|
|||
module.exports = {
|
||||
|
||||
'/s/add': {
|
||||
path: '/_internal/_server_add',
|
||||
custom (router) {
|
||||
router.get('/s/', ctx => ctx.redirect('/s/add'))
|
||||
}
|
||||
},
|
||||
|
||||
'/s/:id': {
|
||||
path: '/_internal/_server',
|
||||
noAutoFix: true,
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"allowJs": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"jsx": "preserve",
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2017"
|
||||
"es2017",
|
||||
|
||||
],
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
|
@ -15,9 +17,10 @@
|
|||
"noUnusedParameters": true,
|
||||
"preserveConstEnums": true,
|
||||
"removeComments": false,
|
||||
"skipLibCheck": true,
|
||||
// "skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"target": "esnext"
|
||||
// "outDir": "./tmp"
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue