Commit 8a326345 authored by Javier Alcala's avatar Javier Alcala Committed by Tim Neutkens

Enable strict type checking on custom-server-typescript example (#7025)

parent 9281f465
......@@ -2,7 +2,7 @@ import { createServer } from 'http'
import { parse } from 'url'
import * as next from 'next'
const port = parseInt(process.env.PORT, 10) || 3000
const port = parseInt(process.env.PORT || '3000', 10)
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
......@@ -10,7 +10,7 @@ const handle = app.getRequestHandler()
app.prepare()
.then(() => {
createServer((req, res) => {
const parsedUrl = parse(req.url, true)
const parsedUrl = parse(req.url!, true)
const { pathname, query } = parsedUrl
if (pathname === '/a') {
......
......@@ -2,6 +2,7 @@
"compileOnSave": false,
"compilerOptions": {
"noEmit": true,
"strict": true,
"target": "esnext",
"module": "esnext",
"jsx": "preserve",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment