Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fully move away from index.d.ts #3561

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist
lib
es
coverage
types

website/translated_docs
website/build/
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,27 @@
"main": "lib/redux.js",
"unpkg": "dist/redux.js",
"module": "es/redux.js",
"typings": "./index.d.ts",
"types": "types/index.d.ts",
"files": [
"dist",
"lib",
"es",
"src",
"index.d.ts"
"types"
],
"scripts": {
"clean": "rimraf lib dist es coverage",
"clean": "rimraf lib dist es coverage types",
"format": "prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
"format:check": "prettier --list-different \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
"lint": "eslint --ext js,ts src test",
"pretest": "npm run build",
"test": "jest",
"test:watch": "npm test -- --watch",
"test:cov": "npm test -- --coverage",
"build": "rollup -c",
"build": "npm run build-types && rollup -c",
"prepare": "npm run clean && npm run check-types && npm run format:check && npm run lint && npm test",
"check-types": "tsc",
timdorr marked this conversation as resolved.
Show resolved Hide resolved
"build-types": "tsc --emitDeclarationOnly",
"check-types": "tsc --noEmit",
"examples:lint": "eslint --ext js,ts examples",
"examples:test": "cross-env CI=true babel-node examples/testAll.js"
},
Expand Down
2 changes: 1 addition & 1 deletion test/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"strict": true,
"baseUrl": "../..",
"paths": {
"redux": ["index.d.ts"]
"redux": ["types/index.d.ts"]
}
}
}
14 changes: 8 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@
// "allowJs": true /* Allow javascript files to be compiled. */,
// "checkJs": true, /* Report errors in .js files. */
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
// "declaration": true /* Generates corresponding '.d.ts' file. */,
"declaration": true /* Generates corresponding '.d.ts' file. */,
// "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
"declarationDir": "./types" /* Output directory for generated declaration files. */,
// "emitDeclarationOnly": true /* Only emit ‘.d.ts’ declaration files. */,
"sourceMap": true /* Generates corresponding '.map' file. */,
// "outFile": "./", /* Concatenate and emit output to single file. */
// "outDir": "." /* Redirect output structure to the directory. */,
// "outDir": "./types" /* Redirect output structure to the directory. */,
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
"removeComments": false /* Do not emit comments to output. */,
"noEmit": true /* Do not emit outputs. */,
// "noEmit": true /* Do not emit outputs. */,
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,
Expand All @@ -42,9 +44,9 @@
/* Module Resolution Options */
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
"paths": {
"*": ["*", "types/*"]
} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
// "paths": {
timdorr marked this conversation as resolved.
Show resolved Hide resolved
// "*": ["*", "types/*"]
// } /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down