Skip to content

Commit 8b574b3

Browse files
committed
better type building, also clean old definitions
1 parent e297fda commit 8b574b3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"types"
3636
],
3737
"scripts": {
38-
"clean": "rimraf lib dist es coverage",
38+
"clean": "rimraf lib dist es coverage types",
3939
"format": "prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
4040
"format:check": "prettier --list-different \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
4141
"lint": "eslint --ext js,ts src test",
@@ -44,8 +44,9 @@
4444
"test:watch": "npm test -- --watch",
4545
"test:cov": "npm test -- --coverage",
4646
"build": "npm run build-types && rollup -c",
47-
"prepare": "npm run clean && npm run format:check && npm run lint && npm test",
48-
"build-types": "tsc",
47+
"prepare": "npm run clean && npm run check-types && npm run format:check && npm run lint && npm test",
48+
"build-types": "tsc --emitDeclarationOnly",
49+
"check-types": "tsc --noEmit",
4950
"examples:lint": "eslint --ext js,ts examples",
5051
"examples:test": "cross-env CI=true babel-node examples/testAll.js"
5152
},

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
"declaration": true /* Generates corresponding '.d.ts' file. */,
1414
"declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
1515
"declarationDir": "./types" /* Output directory for generated declaration files. */,
16+
// "emitDeclarationOnly": true /* Only emit ‘.d.ts’ declaration files. */,
1617
"sourceMap": true /* Generates corresponding '.map' file. */,
1718
// "outFile": "./", /* Concatenate and emit output to single file. */
1819
// "outDir": "./types" /* Redirect output structure to the directory. */,
1920
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
2021
// "composite": true, /* Enable project compilation */
2122
"removeComments": false /* Do not emit comments to output. */,
22-
"noEmit": true /* Do not emit outputs. */,
23+
// "noEmit": true /* Do not emit outputs. */,
2324
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
2425
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
2526
// "isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,

0 commit comments

Comments
 (0)