Skip to content

Commit c507cf0

Browse files
authored
Typescript improvements (#578)
* fix(package): Move ts-toolbelt to production dependencies * feat(package): Expose types via package.json types field * feat(types): Expose Storage API types in main types file
1 parent 214e6d1 commit c507cf0

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

package-lock.json

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"main": "dist/boardgameio.js",
3535
"unpkg": "dist/boardgameio.min.js",
3636
"module": "dist/boardgameio.es.js",
37+
"types": "dist/types/src/types.d.ts",
3738
"files": [
3839
"dist/boardgameio.js",
3940
"dist/boardgameio.min.js",
@@ -129,7 +130,6 @@
129130
"svelte": "^3.12.1",
130131
"svelte-icons": "^1.1.0",
131132
"ts-jest": "^24.0.2",
132-
"ts-toolbelt": "^6.3.5",
133133
"ts-transformer-imports": "^0.4.3",
134134
"ttypescript": "^1.5.7",
135135
"typescript": "^3.8.2"
@@ -148,6 +148,7 @@
148148
"redux": "^4.0.0",
149149
"shortid": "^2.2.14",
150150
"socket.io": "^2.1.1",
151+
"ts-toolbelt": "^6.3.6",
151152
"uuid": "3.2.1"
152153
},
153154
"jest": {

src/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { Object } from 'ts-toolbelt';
22
import * as ActionCreators from './core/action-creators';
33
import { Flow } from './core/flow';
4+
import * as StorageAPI from './server/db/base';
5+
6+
export { StorageAPI };
47

58
export interface State {
69
G: object;

0 commit comments

Comments
 (0)