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
f17d78f8
Unverified
Commit
f17d78f8
authored
May 24, 2020
by
Maxi Gimenez
Committed by
GitHub
May 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(next): export/lib/next-server missing types (#13320)
parent
82dfe157
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10 additions
and
10 deletions
+10
-10
index.ts
packages/next/export/index.ts
+1
-1
recursive-copy.ts
packages/next/lib/recursive-copy.ts
+1
-1
verifyTypeScriptSetup.ts
packages/next/lib/verifyTypeScriptSetup.ts
+1
-1
amp.ts
packages/next/next-server/lib/amp.ts
+2
-2
dynamic.tsx
packages/next/next-server/lib/dynamic.tsx
+1
-1
head.tsx
packages/next/next-server/lib/head.tsx
+1
-1
runtime-config.ts
packages/next/next-server/lib/runtime-config.ts
+1
-1
side-effect.tsx
packages/next/next-server/lib/side-effect.tsx
+1
-1
utils.ts
packages/next/next-server/lib/utils.ts
+1
-1
No files found.
packages/next/export/index.ts
View file @
f17d78f8
...
@@ -90,7 +90,7 @@ export default async function (
...
@@ -90,7 +90,7 @@ export default async function (
options
:
any
,
options
:
any
,
configuration
?:
any
configuration
?:
any
):
Promise
<
void
>
{
):
Promise
<
void
>
{
function
log
(
message
:
string
)
{
function
log
(
message
:
string
)
:
void
{
if
(
options
.
silent
)
{
if
(
options
.
silent
)
{
return
return
}
}
...
...
packages/next/lib/recursive-copy.ts
View file @
f17d78f8
...
@@ -23,7 +23,7 @@ export async function recursiveCopy(
...
@@ -23,7 +23,7 @@ export async function recursiveCopy(
const
sema
=
new
Sema
(
concurrency
)
const
sema
=
new
Sema
(
concurrency
)
async
function
_copy
(
item
:
string
)
{
async
function
_copy
(
item
:
string
)
:
Promise
<
void
>
{
const
target
=
item
.
replace
(
from
,
to
)
const
target
=
item
.
replace
(
from
,
to
)
const
stats
=
await
promises
.
stat
(
item
)
const
stats
=
await
promises
.
stat
(
item
)
...
...
packages/next/lib/verifyTypeScriptSetup.ts
View file @
f17d78f8
...
@@ -30,7 +30,7 @@ async function checkDependencies({
...
@@ -30,7 +30,7 @@ async function checkDependencies({
}:
{
}:
{
dir
:
string
dir
:
string
isYarn
:
boolean
isYarn
:
boolean
})
{
})
:
Promise
<
string
>
{
const
requiredPackages
=
[
const
requiredPackages
=
[
{
file
:
'typescript'
,
pkg
:
'typescript'
},
{
file
:
'typescript'
,
pkg
:
'typescript'
},
{
file
:
'@types/react/index.d.ts'
,
pkg
:
'@types/react'
},
{
file
:
'@types/react/index.d.ts'
,
pkg
:
'@types/react'
},
...
...
packages/next/next-server/lib/amp.ts
View file @
f17d78f8
...
@@ -5,11 +5,11 @@ export function isInAmpMode({
...
@@ -5,11 +5,11 @@ export function isInAmpMode({
ampFirst
=
false
,
ampFirst
=
false
,
hybrid
=
false
,
hybrid
=
false
,
hasQuery
=
false
,
hasQuery
=
false
,
}
=
{})
{
}
=
{})
:
boolean
{
return
ampFirst
||
(
hybrid
&&
hasQuery
)
return
ampFirst
||
(
hybrid
&&
hasQuery
)
}
}
export
function
useAmp
()
{
export
function
useAmp
()
:
boolean
{
// Don't assign the context value to a variable to save bytes
// Don't assign the context value to a variable to save bytes
return
isInAmpMode
(
React
.
useContext
(
AmpStateContext
))
return
isInAmpMode
(
React
.
useContext
(
AmpStateContext
))
}
}
packages/next/next-server/lib/dynamic.tsx
View file @
f17d78f8
...
@@ -52,7 +52,7 @@ export type LoadableComponent<P = {}> = React.ComponentType<P>
...
@@ -52,7 +52,7 @@ export type LoadableComponent<P = {}> = React.ComponentType<P>
export
function
noSSR
<
P
=
{}
>
(
export
function
noSSR
<
P
=
{}
>
(
LoadableInitializer
:
LoadableFn
<
P
>
,
LoadableInitializer
:
LoadableFn
<
P
>
,
loadableOptions
:
LoadableOptions
<
P
>
loadableOptions
:
LoadableOptions
<
P
>
)
{
)
:
React
.
ComponentType
<
P
>
{
// Removing webpack and modules means react-loadable won't try preloading
// Removing webpack and modules means react-loadable won't try preloading
delete
loadableOptions
.
webpack
delete
loadableOptions
.
webpack
delete
loadableOptions
.
modules
delete
loadableOptions
.
modules
...
...
packages/next/next-server/lib/head.tsx
View file @
f17d78f8
...
@@ -8,7 +8,7 @@ type WithInAmpMode = {
...
@@ -8,7 +8,7 @@ type WithInAmpMode = {
inAmpMode
?:
boolean
inAmpMode
?:
boolean
}
}
export
function
defaultHead
(
inAmpMode
=
false
)
{
export
function
defaultHead
(
inAmpMode
=
false
)
:
JSX
.
Element
[]
{
const
head
=
[<
meta
charSet=
"utf-8"
/>]
const
head
=
[<
meta
charSet=
"utf-8"
/>]
if
(
!
inAmpMode
)
{
if
(
!
inAmpMode
)
{
head
.
push
(<
meta
name=
"viewport"
content=
"width=device-width"
/>)
head
.
push
(<
meta
name=
"viewport"
content=
"width=device-width"
/>)
...
...
packages/next/next-server/lib/runtime-config.ts
View file @
f17d78f8
...
@@ -4,6 +4,6 @@ export default () => {
...
@@ -4,6 +4,6 @@ export default () => {
return
runtimeConfig
return
runtimeConfig
}
}
export
function
setConfig
(
configValue
:
any
)
{
export
function
setConfig
(
configValue
:
any
)
:
void
{
runtimeConfig
=
configValue
runtimeConfig
=
configValue
}
}
packages/next/next-server/lib/side-effect.tsx
View file @
f17d78f8
...
@@ -17,7 +17,7 @@ export default () => {
...
@@ -17,7 +17,7 @@ export default () => {
const
mountedInstances
:
Set
<
any
>
=
new
Set
()
const
mountedInstances
:
Set
<
any
>
=
new
Set
()
let
state
:
State
let
state
:
State
function
emitChange
(
component
:
React
.
Component
<
SideEffectProps
>
)
{
function
emitChange
(
component
:
React
.
Component
<
SideEffectProps
>
)
:
void
{
state
=
component
.
props
.
reduceComponentsToState
(
state
=
component
.
props
.
reduceComponentsToState
(
[...
mountedInstances
],
[...
mountedInstances
],
component
.
props
component
.
props
...
...
packages/next/next-server/lib/utils.ts
View file @
f17d78f8
...
@@ -347,7 +347,7 @@ export const urlObjectKeys = [
...
@@ -347,7 +347,7 @@ export const urlObjectKeys = [
export
function
formatWithValidation
(
export
function
formatWithValidation
(
url
:
UrlObject
,
url
:
UrlObject
,
options
?:
URLFormatOptions
options
?:
URLFormatOptions
)
{
)
:
string
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
url
!==
null
&&
typeof
url
===
'object'
)
{
if
(
url
!==
null
&&
typeof
url
===
'object'
)
{
Object
.
keys
(
url
).
forEach
((
key
)
=>
{
Object
.
keys
(
url
).
forEach
((
key
)
=>
{
...
...
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