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
ce329cce
Commit
ce329cce
authored
Mar 19, 2019
by
Jehun Seem(심제훈)
Committed by
Kristian Heruc
Mar 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix with-mobx-state-tree-typescript modules export (#6704)
* Update libraries * Fix for export modules for type
parent
12cbb934
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
package.json
examples/with-mobx-state-tree-typescript/package.json
+4
-4
store.ts
examples/with-mobx-state-tree-typescript/stores/store.ts
+4
-6
No files found.
examples/with-mobx-state-tree-typescript/package.json
View file @
ce329cce
...
...
@@ -9,9 +9,9 @@
},
"dependencies"
:
{
"@zeit/next-typescript"
:
"1.1.0"
,
"mobx"
:
"
5.0.5
"
,
"mobx-react"
:
"
5.2.5
"
,
"mobx-state-tree"
:
"
3.2.3
"
,
"mobx"
:
"
^5.9.0
"
,
"mobx-react"
:
"
^5.4.3
"
,
"mobx-state-tree"
:
"
^3.11.0
"
,
"next"
:
"latest"
,
"react"
:
"^16.7.0"
,
"react-dom"
:
"^16.7.0"
,
...
...
@@ -20,7 +20,7 @@
"devDependencies"
:
{
"@types/next"
:
"^6.1.4"
,
"@types/react"
:
"^16.4.12"
,
"@babel/plugin-proposal-decorators"
:
"^7.
1.2
"
,
"@babel/plugin-proposal-decorators"
:
"^7.
3.0
"
,
"tslint"
:
"^5.9.1"
,
"tslint-config-standard"
:
"^7.0.0"
,
"tslint-loader"
:
"^3.5.3"
,
...
...
examples/with-mobx-state-tree-typescript/stores/store.ts
View file @
ce329cce
...
...
@@ -29,11 +29,11 @@ const Store = types
return
{
start
,
stop
,
update
};
});
type
IStore
=
Instance
<
typeof
Store
>
;
type
IStoreSnapshotIn
=
SnapshotIn
<
typeof
Store
>
;
type
IStoreSnapshotOut
=
SnapshotOut
<
typeof
Store
>
;
export
type
IStore
=
Instance
<
typeof
Store
>
;
export
type
IStoreSnapshotIn
=
SnapshotIn
<
typeof
Store
>
;
export
type
IStoreSnapshotOut
=
SnapshotOut
<
typeof
Store
>
;
const
initializeStore
=
(
isServer
,
snapshot
=
null
)
=>
{
export
const
initializeStore
=
(
isServer
,
snapshot
=
null
)
=>
{
if
(
isServer
)
{
store
=
Store
.
create
({
foo
:
6
,
lastUpdate
:
Date
.
now
()
});
}
...
...
@@ -45,5 +45,3 @@ const initializeStore = (isServer, snapshot = null) => {
}
return
store
;
};
export
{
initializeStore
,
IStore
,
IStoreSnapshotIn
,
IStoreSnapshotOut
};
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