Skip to content

Commit 5e8f2a1

Browse files
committed
chore: layout the foundation for a typescript definition
1 parent 7e287e8 commit 5e8f2a1

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"test:cov-codacy": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test --recursive && cat coverage/lcov.info | codacy-coverage",
3131
"test:rxbuild": "cross-env BABEL_ENV=commonjs mocha --compilers js:babel-register test/rxbuild.spec.js -r ./test/setup.js",
3232
"test:examples": "cross-env BABEL_ENV=commonjs babel-node examples/testAll.js",
33-
"check:src": "npm run lint && npm run test && npm run test:rxbuild && npm run test:prod",
33+
"test:typescript": "tsc --noEmit",
34+
"check:src": "npm run lint && npm run test && npm run test:rxbuild && npm run test:prod && npm run test:typescript",
3435
"check:examples": "npm run build:examples && npm run test:examples",
3536
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir build-lib",
3637
"build:es": "cross-env BABEL_ENV=es babel src --out-dir build-es",
@@ -80,6 +81,8 @@
8081
"redux": "^3.5.2"
8182
},
8283
"devDependencies": {
84+
"@types/mocha": "^5.2.2",
85+
"@types/node": "^10.3.4",
8386
"babel-cli": "^6.3.15",
8487
"babel-core": "^6.3.15",
8588
"babel-eslint": "^7.0.0",
@@ -121,6 +124,7 @@
121124
"nyc": "^13.0.0",
122125
"redux": "^3.5.2",
123126
"rimraf": "^2.3.4",
127+
"typescript": "~2.8.0",
124128
"webpack": "^1.9.6"
125129
},
126130
"npmName": "redux-logic",
@@ -145,5 +149,6 @@
145149
],
146150
"sourceMap": false,
147151
"instrument": false
148-
}
152+
},
153+
"typings": "definitions/index.d.ts"
149154
}

tsconfig.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"moduleResolution": "node",
5+
"esModuleInterop": true,
6+
"noImplicitAny": false,
7+
"noImplicitUseStrict": false,
8+
"noLib": false,
9+
"noResolve": false,
10+
"noUnusedLocals": false,
11+
"noUnusedParameters": false,
12+
"lib": [
13+
"dom",
14+
"es2017"
15+
],
16+
"typeRoots": [
17+
"node_modules/@types"
18+
]
19+
},
20+
"include": [
21+
"**/*.ts",
22+
"**/*.d.ts"
23+
],
24+
"exclude": [
25+
"dist",
26+
"node_modules"
27+
]
28+
}

0 commit comments

Comments
 (0)