Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
254b23eb
Unverified
Commit
254b23eb
authored
Apr 23, 2019
by
Luis Fernando Alvarez D
Committed by
GitHub
Apr 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add declaration files to /dist (#7118)
parent
498ec618
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
74 additions
and
40 deletions
+74
-40
next-minify-loader.ts
packages/next/build/webpack/loaders/next-minify-loader.ts
+1
-1
build-manifest-plugin.ts
packages/next/build/webpack/plugins/build-manifest-plugin.ts
+7
-6
chunk-names-plugin.ts
packages/next/build/webpack/plugins/chunk-names-plugin.ts
+5
-4
nextjs-ssr-import.ts
packages/next/build/webpack/plugins/nextjs-ssr-import.ts
+4
-3
nextjs-ssr-module-cache.ts
...ges/next/build/webpack/plugins/nextjs-ssr-module-cache.ts
+8
-6
react-loadable-plugin.ts
packages/next/build/webpack/plugins/react-loadable-plugin.ts
+11
-9
index.d.ts
...uild/webpack/plugins/terser-webpack-plugin/src/index.d.ts
+14
-0
minify.ts
...build/webpack/plugins/terser-webpack-plugin/src/minify.ts
+4
-4
format-webpack-messages.d.ts
...ext/client/dev-error-overlay/format-webpack-messages.d.ts
+1
-0
index.d.ts
packages/next/export/index.d.ts
+1
-0
package.json
packages/next/package.json
+3
-2
start-server.ts
packages/next/server/lib/start-server.ts
+1
-1
utils.ts
packages/next/server/lib/utils.ts
+2
-1
next.d.ts
packages/next/server/next.d.ts
+1
-0
next.js
packages/next/server/next.js
+1
-1
tsconfig.json
packages/next/tsconfig.json
+0
-2
index.d.ts
packages/next/types/index.d.ts
+10
-0
No files found.
packages/next/build/webpack/loaders/next-minify-loader.ts
View file @
254b23eb
...
@@ -8,7 +8,7 @@ const nextMiniferLoader: loader.Loader = function(source) {
...
@@ -8,7 +8,7 @@ const nextMiniferLoader: loader.Loader = function(source) {
const
options
=
loaderUtils
.
getOptions
(
this
)
||
{}
const
options
=
loaderUtils
.
getOptions
(
this
)
||
{}
const
{
error
,
code
}
=
minify
({
const
{
error
,
code
}
=
minify
({
file
:
'noop'
,
file
:
'noop'
,
input
:
source
,
input
:
source
as
string
,
terserOptions
:
{
...
options
.
terserOptions
,
sourceMap
:
false
},
terserOptions
:
{
...
options
.
terserOptions
,
sourceMap
:
false
},
})
})
...
...
packages/next/build/webpack/plugins/build-manifest-plugin.
j
s
→
packages/next/build/webpack/plugins/build-manifest-plugin.
t
s
View file @
254b23eb
import
{
Compiler
}
from
'webpack'
import
{
RawSource
}
from
'webpack-sources'
import
{
RawSource
}
from
'webpack-sources'
import
{
import
{
BUILD_MANIFEST
,
BUILD_MANIFEST
,
...
@@ -9,19 +10,19 @@ import {
...
@@ -9,19 +10,19 @@ import {
// This plugin creates a build-manifest.json for all assets that are being output
// This plugin creates a build-manifest.json for all assets that are being output
// It has a mapping of "entry" filename to real filename. Because the real filename can be hashed in production
// It has a mapping of "entry" filename to real filename. Because the real filename can be hashed in production
export
default
class
BuildManifestPlugin
{
export
default
class
BuildManifestPlugin
{
apply
(
compiler
)
{
apply
(
compiler
:
Compiler
)
{
compiler
.
hooks
.
emit
.
tapAsync
(
compiler
.
hooks
.
emit
.
tapAsync
(
'NextJsBuildManifest'
,
'NextJsBuildManifest'
,
(
compilation
,
callback
)
=>
{
(
compilation
,
callback
)
=>
{
const
{
chunks
}
=
compilation
const
{
chunks
}
=
compilation
const
assetMap
=
{
devFiles
:
[],
pages
:
{}
}
const
assetMap
:
{
devFiles
:
string
[],
pages
:
{
[
page
:
string
]:
string
[]
}
}
=
{
devFiles
:
[],
pages
:
{}
}
const
mainJsChunk
=
chunks
.
find
(
const
mainJsChunk
=
chunks
.
find
(
c
=>
c
.
name
===
CLIENT_STATIC_FILES_RUNTIME_MAIN
c
=>
c
.
name
===
CLIENT_STATIC_FILES_RUNTIME_MAIN
)
)
const
mainJsFiles
=
const
mainJsFiles
:
string
[]
=
mainJsChunk
&&
mainJsChunk
.
files
.
length
>
0
mainJsChunk
&&
mainJsChunk
.
files
.
length
>
0
?
mainJsChunk
.
files
.
filter
(
file
=>
/
\.
js$/
.
test
(
file
))
?
mainJsChunk
.
files
.
filter
(
(
file
:
string
)
=>
/
\.
js$/
.
test
(
file
))
:
[]
:
[]
for
(
const
filePath
of
Object
.
keys
(
compilation
.
assets
))
{
for
(
const
filePath
of
Object
.
keys
(
compilation
.
assets
))
{
...
@@ -44,7 +45,7 @@ export default class BuildManifestPlugin {
...
@@ -44,7 +45,7 @@ export default class BuildManifestPlugin {
continue
continue
}
}
const
filesForEntry
=
[]
const
filesForEntry
:
string
[]
=
[]
for
(
const
chunk
of
entrypoint
.
chunks
)
{
for
(
const
chunk
of
entrypoint
.
chunks
)
{
// If there's no name or no files
// If there's no name or no files
if
(
!
chunk
.
name
||
!
chunk
.
files
)
{
if
(
!
chunk
.
name
||
!
chunk
.
files
)
{
...
@@ -83,7 +84,7 @@ export default class BuildManifestPlugin {
...
@@ -83,7 +84,7 @@ export default class BuildManifestPlugin {
assetMap
.
pages
=
Object
.
keys
(
assetMap
.
pages
)
assetMap
.
pages
=
Object
.
keys
(
assetMap
.
pages
)
.
sort
()
.
sort
()
// eslint-disable-next-line
// eslint-disable-next-line
.
reduce
((
a
,
c
)
=>
((
a
[
c
]
=
assetMap
.
pages
[
c
]),
a
),
{})
.
reduce
((
a
,
c
)
=>
((
a
[
c
]
=
assetMap
.
pages
[
c
]),
a
),
{}
as
any
)
compilation
.
assets
[
BUILD_MANIFEST
]
=
new
RawSource
(
compilation
.
assets
[
BUILD_MANIFEST
]
=
new
RawSource
(
JSON
.
stringify
(
assetMap
,
null
,
2
)
JSON
.
stringify
(
assetMap
,
null
,
2
)
...
...
packages/next/build/webpack/plugins/chunk-names-plugin.
j
s
→
packages/next/build/webpack/plugins/chunk-names-plugin.
t
s
View file @
254b23eb
import
{
Compiler
}
from
'webpack'
// This plugin mirrors webpack 3 `filename` and `chunkfilename` behavior
// This plugin mirrors webpack 3 `filename` and `chunkfilename` behavior
// This fixes https://github.com/webpack/webpack/issues/6598
// This fixes https://github.com/webpack/webpack/issues/6598
// This plugin is based on https://github.com/researchgate/webpack/commit/2f28947fa0c63ccbb18f39c0098bd791a2c37090
// This plugin is based on https://github.com/researchgate/webpack/commit/2f28947fa0c63ccbb18f39c0098bd791a2c37090
export
default
class
ChunkNamesPlugin
{
export
default
class
ChunkNamesPlugin
{
apply
(
compiler
)
{
apply
(
compiler
:
Compiler
)
{
compiler
.
hooks
.
compilation
.
tap
(
'NextJsChunkNamesPlugin'
,
(
compilation
)
=>
{
compiler
.
hooks
.
compilation
.
tap
(
'NextJsChunkNamesPlugin'
,
(
compilation
:
any
)
=>
{
compilation
.
chunkTemplate
.
hooks
.
renderManifest
.
intercept
({
compilation
.
chunkTemplate
.
hooks
.
renderManifest
.
intercept
({
register
(
tapInfo
)
{
register
(
tapInfo
:
any
)
{
if
(
tapInfo
.
name
===
'JavascriptModulesPlugin'
)
{
if
(
tapInfo
.
name
===
'JavascriptModulesPlugin'
)
{
const
originalMethod
=
tapInfo
.
fn
const
originalMethod
=
tapInfo
.
fn
tapInfo
.
fn
=
(
result
,
options
)
=>
{
tapInfo
.
fn
=
(
result
:
any
,
options
:
any
)
=>
{
let
filenameTemplate
let
filenameTemplate
const
chunk
=
options
.
chunk
const
chunk
=
options
.
chunk
const
outputOptions
=
options
.
outputOptions
const
outputOptions
=
options
.
outputOptions
...
...
packages/next/build/webpack/plugins/nextjs-ssr-import.
j
s
→
packages/next/build/webpack/plugins/nextjs-ssr-import.
t
s
View file @
254b23eb
import
{
join
,
resolve
,
relative
,
dirname
}
from
'path'
import
{
join
,
resolve
,
relative
,
dirname
}
from
'path'
import
{
Compiler
}
from
'webpack'
// This plugin modifies the require-ensure code generated by Webpack
// This plugin modifies the require-ensure code generated by Webpack
// to work with Next.js SSR
// to work with Next.js SSR
export
default
class
NextJsSsrImportPlugin
{
export
default
class
NextJsSsrImportPlugin
{
apply
(
compiler
)
{
apply
(
compiler
:
Compiler
)
{
compiler
.
hooks
.
compilation
.
tap
(
'NextJsSSRImport'
,
(
compilation
)
=>
{
compiler
.
hooks
.
compilation
.
tap
(
'NextJsSSRImport'
,
(
compilation
:
any
)
=>
{
compilation
.
mainTemplate
.
hooks
.
requireEnsure
.
tap
(
'NextJsSSRImport'
,
(
code
,
chunk
)
=>
{
compilation
.
mainTemplate
.
hooks
.
requireEnsure
.
tap
(
'NextJsSSRImport'
,
(
code
:
string
,
chunk
:
any
)
=>
{
// Update to load chunks from our custom chunks directory
// Update to load chunks from our custom chunks directory
const
outputPath
=
resolve
(
'/'
)
const
outputPath
=
resolve
(
'/'
)
const
pagePath
=
join
(
'/'
,
dirname
(
chunk
.
name
))
const
pagePath
=
join
(
'/'
,
dirname
(
chunk
.
name
))
...
...
packages/next/build/webpack/plugins/nextjs-ssr-module-cache.
j
s
→
packages/next/build/webpack/plugins/nextjs-ssr-module-cache.
t
s
View file @
254b23eb
...
@@ -16,10 +16,12 @@ const SSR_MODULE_CACHE_FILENAME = 'ssr-module-cache.js'
...
@@ -16,10 +16,12 @@ const SSR_MODULE_CACHE_FILENAME = 'ssr-module-cache.js'
// Do note that this module is only geared towards the `node` compilation target.
// Do note that this module is only geared towards the `node` compilation target.
// For the client side compilation we use `runtimeChunk: 'single'`
// For the client side compilation we use `runtimeChunk: 'single'`
export
default
class
NextJsSsrImportPlugin
{
export
default
class
NextJsSsrImportPlugin
{
constructor
(
options
)
{
private
options
:
{
outputPath
:
string
}
constructor
(
options
:
{
outputPath
:
string
})
{
this
.
options
=
options
this
.
options
=
options
}
}
apply
(
compiler
)
{
apply
(
compiler
:
webpack
.
Compiler
)
{
const
{
outputPath
}
=
this
.
options
const
{
outputPath
}
=
this
.
options
compiler
.
hooks
.
emit
.
tapAsync
(
'NextJsSSRModuleCache'
,
(
compilation
,
callback
)
=>
{
compiler
.
hooks
.
emit
.
tapAsync
(
'NextJsSSRModuleCache'
,
(
compilation
,
callback
)
=>
{
compilation
.
assets
[
SSR_MODULE_CACHE_FILENAME
]
=
new
RawSource
(
`
compilation
.
assets
[
SSR_MODULE_CACHE_FILENAME
]
=
new
RawSource
(
`
...
@@ -28,12 +30,12 @@ export default class NextJsSsrImportPlugin {
...
@@ -28,12 +30,12 @@ export default class NextJsSsrImportPlugin {
`
)
`
)
callback
()
callback
()
})
})
compiler
.
hooks
.
compilation
.
tap
(
'NextJsSSRModuleCache'
,
(
compilation
)
=>
{
compiler
.
hooks
.
compilation
.
tap
(
'NextJsSSRModuleCache'
,
(
compilation
:
any
)
=>
{
compilation
.
mainTemplate
.
hooks
.
localVars
.
intercept
({
compilation
.
mainTemplate
.
hooks
.
localVars
.
intercept
({
register
(
tapInfo
)
{
register
(
tapInfo
:
any
)
{
if
(
tapInfo
.
name
===
'MainTemplate'
)
{
if
(
tapInfo
.
name
===
'MainTemplate'
)
{
const
originalFn
=
tapInfo
.
fn
const
originalFn
=
tapInfo
.
fn
tapInfo
.
fn
=
(
source
,
chunk
)
=>
{
tapInfo
.
fn
=
(
source
:
any
,
chunk
:
any
)
=>
{
// If the chunk is not part of the pages directory we have to keep the original behavior,
// If the chunk is not part of the pages directory we have to keep the original behavior,
// otherwise webpack will error out when the file is used before the compilation finishes
// otherwise webpack will error out when the file is used before the compilation finishes
// this is the case with mini-css-extract-plugin
// this is the case with mini-css-extract-plugin
...
@@ -46,7 +48,7 @@ export default class NextJsSsrImportPlugin {
...
@@ -46,7 +48,7 @@ export default class NextJsSsrImportPlugin {
// Make sure even in windows, the path looks like in unix
// Make sure even in windows, the path looks like in unix
// Node.js require system will convert it accordingly
// Node.js require system will convert it accordingly
const
relativePathToBaseDirNormalized
=
relativePathToBaseDir
.
replace
(
/
\\
/g
,
'/'
)
const
relativePathToBaseDirNormalized
=
relativePathToBaseDir
.
replace
(
/
\\
/g
,
'/'
)
return
webpack
.
Template
.
asString
([
return
(
webpack
as
any
)
.
Template
.
asString
([
source
,
source
,
'// The module cache'
,
'// The module cache'
,
`var installedModules = require('
${
relativePathToBaseDirNormalized
}
');`
`var installedModules = require('
${
relativePathToBaseDirNormalized
}
');`
...
...
packages/next/build/webpack/plugins/react-loadable-plugin.
j
s
→
packages/next/build/webpack/plugins/react-loadable-plugin.
t
s
View file @
254b23eb
...
@@ -22,21 +22,22 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWAR
...
@@ -22,21 +22,22 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWAR
// Modified to strip out unneeded results for Next's specific use case
// Modified to strip out unneeded results for Next's specific use case
import
url
from
'url'
import
url
from
'url'
import
{
Compiler
,
compilation
}
from
'webpack'
function
buildManifest
(
compiler
,
c
ompilation
)
{
function
buildManifest
(
compiler
:
Compiler
,
compilation
:
compilation
.
C
ompilation
)
{
let
context
=
compiler
.
options
.
context
let
context
=
compiler
.
options
.
context
let
manifest
=
{}
let
manifest
:
{
[
k
:
string
]:
any
[]
}
=
{}
compilation
.
chunkGroups
.
forEach
(
chunkGroup
=>
{
compilation
.
chunkGroups
.
forEach
(
chunkGroup
=>
{
if
(
chunkGroup
.
isInitial
())
{
if
(
chunkGroup
.
isInitial
())
{
return
return
}
}
chunkGroup
.
origins
.
forEach
(
chunkGroupOrigin
=>
{
chunkGroup
.
origins
.
forEach
(
(
chunkGroupOrigin
:
any
)
=>
{
const
{
request
}
=
chunkGroupOrigin
const
{
request
}
=
chunkGroupOrigin
chunkGroup
.
chunks
.
forEach
(
chunk
=>
{
chunkGroup
.
chunks
.
forEach
(
(
chunk
:
any
)
=>
{
chunk
.
files
.
forEach
(
file
=>
{
chunk
.
files
.
forEach
(
(
file
:
string
)
=>
{
if
(
!
file
.
match
(
/
\.
js$/
)
||
!
file
.
match
(
/^static
\/
chunks
\/
/
))
{
if
(
!
file
.
match
(
/
\.
js$/
)
||
!
file
.
match
(
/^static
\/
chunks
\/
/
))
{
return
return
}
}
...
@@ -76,18 +77,19 @@ function buildManifest (compiler, compilation) {
...
@@ -76,18 +77,19 @@ function buildManifest (compiler, compilation) {
manifest
=
Object
.
keys
(
manifest
)
manifest
=
Object
.
keys
(
manifest
)
.
sort
()
.
sort
()
// eslint-disable-next-line
.
reduce
((
a
,
c
)
=>
((
a
[
c
]
=
manifest
[
c
]),
a
),
{}
as
any
)
.
reduce
((
a
,
c
)
=>
((
a
[
c
]
=
manifest
[
c
]),
a
),
{})
return
manifest
return
manifest
}
}
export
class
ReactLoadablePlugin
{
export
class
ReactLoadablePlugin
{
constructor
(
opts
=
{})
{
private
filename
:
string
constructor
(
opts
:
{
filename
:
string
})
{
this
.
filename
=
opts
.
filename
this
.
filename
=
opts
.
filename
}
}
apply
(
compiler
)
{
apply
(
compiler
:
Compiler
)
{
compiler
.
hooks
.
emit
.
tapAsync
(
compiler
.
hooks
.
emit
.
tapAsync
(
'ReactLoadableManifest'
,
'ReactLoadableManifest'
,
(
compilation
,
callback
)
=>
{
(
compilation
,
callback
)
=>
{
...
...
packages/next/build/webpack/plugins/terser-webpack-plugin/src/index.d.ts
0 → 100644
View file @
254b23eb
export
class
TerserPlugin
{
readonly
cpus
:
any
readonly
distDir
:
any
readonly
options
:
any
constructor
(
options
?:
any
)
static
isSourceMap
(
input
:
any
):
any
static
buildSourceMap
(
inputSourceMap
:
any
):
any
static
buildError
(
err
:
any
,
file
:
any
,
sourceMap
:
any
,
requestShortener
?:
any
):
any
static
buildWarning
(
warning
:
any
,
file
:
any
,
sourceMap
:
any
,
requestShortener
?:
any
,
warningsFilter
?:
any
):
any
apply
(
compiler
:
any
):
void
}
packages/next/build/webpack/plugins/terser-webpack-plugin/src/minify.
j
s
→
packages/next/build/webpack/plugins/terser-webpack-plugin/src/minify.
t
s
View file @
254b23eb
/* eslint-disable
/* eslint-disable
arrow-body-style
arrow-body-style
*/
*/
import
{
minify
as
terser
}
from
'terser'
;
import
{
minify
as
terser
,
MinifyOptions
}
from
'terser'
;
const
buildTerserOptions
=
({
const
buildTerserOptions
=
({
ecma
,
ecma
,
...
@@ -18,7 +18,7 @@ const buildTerserOptions = ({
...
@@ -18,7 +18,7 @@ const buildTerserOptions = ({
keep_fnames
,
keep_fnames
,
/* eslint-enable camelcase */
/* eslint-enable camelcase */
safari10
,
safari10
,
}
=
{})
=>
({
}
:
MinifyOptions
=
{})
=>
({
ecma
,
ecma
,
warnings
,
warnings
,
parse
:
{
...
parse
},
parse
:
{
...
parse
},
...
@@ -45,7 +45,7 @@ const buildTerserOptions = ({
...
@@ -45,7 +45,7 @@ const buildTerserOptions = ({
safari10
,
safari10
,
});
});
const
minify
=
(
options
)
=>
{
const
minify
=
(
options
:
{
file
:
string
,
input
:
string
,
inputSourceMap
?:
string
,
terserOptions
?:
MinifyOptions
}
)
=>
{
const
{
const
{
file
,
file
,
input
,
input
,
...
@@ -53,7 +53,7 @@ const minify = (options) => {
...
@@ -53,7 +53,7 @@ const minify = (options) => {
}
=
options
;
}
=
options
;
// Copy terser options
// Copy terser options
const
terserOptions
=
buildTerserOptions
(
options
.
terserOptions
);
const
terserOptions
=
buildTerserOptions
(
options
.
terserOptions
)
as
any
;
// Add source map data
// Add source map data
if
(
inputSourceMap
)
{
if
(
inputSourceMap
)
{
...
...
packages/next/client/dev-error-overlay/format-webpack-messages.d.ts
0 → 100644
View file @
254b23eb
export
default
function
formatWebpackMessages
(
json
:
any
):
any
;
packages/next/export/index.d.ts
0 → 100644
View file @
254b23eb
export
default
function
(
dir
:
string
,
options
:
any
,
configuration
?:
any
):
Promise
<
void
>
packages/next/package.json
View file @
254b23eb
...
@@ -29,8 +29,9 @@
...
@@ -29,8 +29,9 @@
"scripts"
:
{
"scripts"
:
{
"build"
:
"taskr"
,
"build"
:
"taskr"
,
"release"
:
"taskr release"
,
"release"
:
"taskr release"
,
"prepublish"
:
"npm run release"
,
"prepublish"
:
"npm run release && npm run types"
,
"typescript"
:
"tsc --noEmit"
"typescript"
:
"tsc --noEmit --declaration"
,
"types"
:
"tsc --declaration --emitDeclarationOnly --declarationDir dist"
},
},
"taskr"
:
{
"taskr"
:
{
"requires"
:
[
"requires"
:
[
...
...
packages/next/server/lib/start-server.
j
s
→
packages/next/server/lib/start-server.
t
s
View file @
254b23eb
import
http
from
'http'
import
http
from
'http'
import
next
from
'../next'
import
next
from
'../next'
export
default
async
function
start
(
serverOptions
,
port
,
hostname
)
{
export
default
async
function
start
(
serverOptions
:
any
,
port
?:
number
,
hostname
?:
string
)
{
const
app
=
next
(
serverOptions
)
const
app
=
next
(
serverOptions
)
const
srv
=
http
.
createServer
(
app
.
getRequestHandler
())
const
srv
=
http
.
createServer
(
app
.
getRequestHandler
())
await
new
Promise
((
resolve
,
reject
)
=>
{
await
new
Promise
((
resolve
,
reject
)
=>
{
...
...
packages/next/server/lib/utils.
j
s
→
packages/next/server/lib/utils.
t
s
View file @
254b23eb
export
function
printAndExit
(
message
,
code
=
1
)
{
export
function
printAndExit
(
message
:
string
,
code
=
1
)
{
if
(
code
===
0
)
{
if
(
code
===
0
)
{
// tslint:disable-next-line no-console
console
.
log
(
message
)
console
.
log
(
message
)
}
else
{
}
else
{
console
.
error
(
message
)
console
.
error
(
message
)
...
...
packages/next/server/next.d.ts
0 → 100644
View file @
254b23eb
export
default
function
(
options
:
any
):
any
packages/next/server/next.js
View file @
254b23eb
// This file is used for when users run `require('next')`
// This file is used for when users run `require('next')`
module
.
exports
=
(
options
)
=>
{
module
.
exports
=
options
=>
{
if
(
options
.
dev
)
{
if
(
options
.
dev
)
{
const
Server
=
require
(
'./next-dev-server'
).
default
const
Server
=
require
(
'./next-dev-server'
).
default
return
new
Server
(
options
)
return
new
Server
(
options
)
...
...
packages/next/tsconfig.json
View file @
254b23eb
{
{
"compilerOptions"
:
{
"compilerOptions"
:
{
"strict"
:
true
,
"strict"
:
true
,
"allowJs"
:
true
,
"noEmit"
:
true
,
"module"
:
"esnext"
,
"module"
:
"esnext"
,
"target"
:
"ES2017"
,
"target"
:
"ES2017"
,
"esModuleInterop"
:
true
,
"esModuleInterop"
:
true
,
...
...
packages/next/types/index.d.ts
View file @
254b23eb
...
@@ -57,6 +57,16 @@ declare module 'next/dist/compiled/resolve/index.js' {
...
@@ -57,6 +57,16 @@ declare module 'next/dist/compiled/resolve/index.js' {
export
=
resolve
;
export
=
resolve
;
}
}
declare
module
'next/dist/compiled/text-table'
{
function
textTable
(
rows
:
Array
<
Array
<
{}
>>
,
opts
?:
{
hsep
?:
string
,
align
?:
Array
<
'l'
|
'r'
|
'c'
|
'.'
>
,
stringLength
?(
str
:
string
):
number
}):
string
;
export
=
textTable
;
}
declare
module
'next/dist/compiled/arg/index.js'
{
declare
module
'next/dist/compiled/arg/index.js'
{
function
arg
<
T
extends
arg
.
Spec
>
(
spec
:
T
,
options
?:
{
argv
?:
string
[],
permissive
?:
boolean
}):
arg
.
Result
<
T
>
;
function
arg
<
T
extends
arg
.
Spec
>
(
spec
:
T
,
options
?:
{
argv
?:
string
[],
permissive
?:
boolean
}):
arg
.
Result
<
T
>
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment