redux-bootstrap: Provides its own types (#22386)

This commit is contained in:
Andy
2017-12-20 13:58:22 -08:00
committed by GitHub
parent 2302b6dd80
commit 3bfd05f8af
6 changed files with 6 additions and 158 deletions
+6
View File
@@ -654,6 +654,12 @@
"sourceRepoURL": "https://github.com/tshelburne/redux-batched-actions",
"asOfVersion": "0.1.5"
},
{
"libraryName": "react-bootstrap",
"typingsPackageName": "redux-bootstrap",
"sourceRepoURL": "https://github.com/remojansen/redux-bootstrap",
"asOfVersion": "1.1.0"
},
{
"libraryName": "redux-devtools-extension",
"typingsPackageName": "redux-devtools-extension",
-30
View File
@@ -1,30 +0,0 @@
// Type definitions for react-bootstrap 1.0
// Project: https://github.com/remojansen/redux-bootstrap
// Definitions by: Remo H. Jansen <https://github.com/remojansen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as React from "react";
import { Middleware, Reducer, Store } from "redux";
import { History } from "history";
export interface BootstrapOptions {
routes: JSX.Element;
reducers: ReducersOption;
middlewares?: Middleware[];
initialState?: any;
container?: string;
}
export interface BootstrapResult {
store: Store<any>;
history: History;
root: JSX.Element;
}
export interface ReducersOption {
[index: string]: Reducer<any>;
}
export default function bootstrap(options: BootstrapOptions): BootstrapResult;
-6
View File
@@ -1,6 +0,0 @@
{
"private": true,
"dependencies": {
"redux": "^3.6.0"
}
}
@@ -1,18 +0,0 @@
import bootstrap from "redux-bootstrap";
let routes: JSX.Element = null;
let result = bootstrap({
container: "root",
initialState: {},
middlewares: [],
reducers: {
reposReducer: (previousState: any, action: any): any => { return null; },
usersReducer: (previousState: any, action: any): any => { return null; }
},
routes: routes
});
console.log(result.store);
console.log(result.history);
console.log(result.root);
-25
View File
@@ -1,25 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react"
},
"files": [
"index.d.ts",
"redux-bootstrap-tests.tsx"
]
}
-79
View File
@@ -1,79 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
"adjacent-overload-signatures": false,
"array-type": false,
"arrow-return-shorthand": false,
"ban-types": false,
"callable-types": false,
"comment-format": false,
"dt-header": false,
"eofline": false,
"export-just-namespace": false,
"import-spacing": false,
"interface-name": false,
"interface-over-type-literal": false,
"jsdoc-format": false,
"max-line-length": false,
"member-access": false,
"new-parens": false,
"no-any-union": false,
"no-boolean-literal-compare": false,
"no-conditional-assignment": false,
"no-consecutive-blank-lines": false,
"no-construct": false,
"no-declare-current-package": false,
"no-duplicate-imports": false,
"no-duplicate-variable": false,
"no-empty-interface": false,
"no-for-in-array": false,
"no-inferrable-types": false,
"no-internal-module": false,
"no-irregular-whitespace": false,
"no-mergeable-namespace": false,
"no-misused-new": false,
"no-namespace": false,
"no-object-literal-type-assertion": false,
"no-padding": false,
"no-redundant-jsdoc": false,
"no-redundant-jsdoc-2": false,
"no-redundant-undefined": false,
"no-reference-import": false,
"no-relative-import-in-test": false,
"no-self-import": false,
"no-single-declare-module": false,
"no-string-throw": false,
"no-unnecessary-callback-wrapper": false,
"no-unnecessary-class": false,
"no-unnecessary-generics": false,
"no-unnecessary-qualifier": false,
"no-unnecessary-type-assertion": false,
"no-useless-files": false,
"no-var-keyword": false,
"no-var-requires": false,
"no-void-expression": false,
"no-trailing-whitespace": false,
"object-literal-key-quotes": false,
"object-literal-shorthand": false,
"one-line": false,
"one-variable-per-declaration": false,
"only-arrow-functions": false,
"prefer-conditional-expression": false,
"prefer-const": false,
"prefer-declare-function": false,
"prefer-for-of": false,
"prefer-method-signature": false,
"prefer-template": false,
"radix": false,
"semicolon": false,
"space-before-function-paren": false,
"space-within-parens": false,
"strict-export-declare-modifiers": false,
"trim-file": false,
"triple-equals": false,
"typedef-whitespace": false,
"unified-signatures": false,
"void-return": false,
"whitespace": false
}
}