mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 12:19:10 +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 = {
|
module.exports = {
|
||||||
|
|
||||||
'/s/add': {
|
'/s/add': {
|
||||||
path: '/_internal/_server_add',
|
path: '/_internal/_server_add',
|
||||||
custom (router) {
|
custom (router) {
|
||||||
router.get('/s/', ctx => ctx.redirect('/s/add'))
|
router.get('/s/', ctx => ctx.redirect('/s/add'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
'/s/:id': {
|
'/s/:id': {
|
||||||
path: '/_internal/_server',
|
path: '/_internal/_server',
|
||||||
noAutoFix: true,
|
noAutoFix: true,
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": false,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"es2017"
|
"es2017",
|
||||||
|
|
||||||
],
|
],
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
@ -15,9 +17,10 @@
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"preserveConstEnums": true,
|
"preserveConstEnums": true,
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
"skipLibCheck": true,
|
// "skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"target": "esnext"
|
"target": "esnext"
|
||||||
|
// "outDir": "./tmp"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue