From c1723fcd2148223955e3e4db945bc5eb41a73527 Mon Sep 17 00:00:00 2001 From: Oden Date: Sat, 20 May 2017 13:52:58 -0700 Subject: [PATCH] Add `redux-devtools-extension` to notNeededPackages. --- notNeededPackages.json | 6 + types/redux-devtools-extension/index.d.ts | 146 ------------------ types/redux-devtools-extension/package.json | 5 - .../redux-devtools-extension-tests.ts | 90 ----------- types/redux-devtools-extension/tsconfig.json | 22 --- types/redux-devtools-extension/tslint.json | 1 - 6 files changed, 6 insertions(+), 264 deletions(-) delete mode 100644 types/redux-devtools-extension/index.d.ts delete mode 100644 types/redux-devtools-extension/package.json delete mode 100644 types/redux-devtools-extension/redux-devtools-extension-tests.ts delete mode 100644 types/redux-devtools-extension/tsconfig.json delete mode 100644 types/redux-devtools-extension/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 25205b3c04..c89702a9f6 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -420,6 +420,12 @@ "sourceRepoURL": "https://github.com/tshelburne/redux-batched-actions", "asOfVersion": "0.1.5" }, + { + "libraryName": "redux-devtools-extension", + "typingsPackageName": "redux-devtools-extension", + "sourceRepoURL": "https://github.com/zalmoxisus/redux-devtools-extension", + "asOfVersion": "2.13.2" + }, { "libraryName": "redux-persist", "typingsPackageName": "redux-persist", diff --git a/types/redux-devtools-extension/index.d.ts b/types/redux-devtools-extension/index.d.ts deleted file mode 100644 index 6ef19104c4..0000000000 --- a/types/redux-devtools-extension/index.d.ts +++ /dev/null @@ -1,146 +0,0 @@ -// Type definitions for redux-devtools-extension 2.13 -// Project: https://github.com/zalmoxisus/redux-devtools-extension -// Definitions by: Daniel Perez Alvarez -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import { - Action, - ActionCreator, - ActionCreatorsMapObject, - GenericStoreEnhancer -} from "redux"; - -export interface ReduxDevToolsSerializeOptions { - /** Serialization mode. */ - options?: any; - /** JSON replacer function used for both actions and states stringify. */ - replacer?(key: any, value: any): any; - /** JSON reviver function used for parsing the imported actions and states. */ - reviver?(key: any, value: any): any; - /** - * Automatically serialize/deserialize Immutable.js via - * `remotedev-serialize`. - */ - immutable?: any; - /** - * Immutable.js `Record` classes used to make possible restore its - * instances back when importing, persisting, etc. - */ - refs?: any[]; -} - -export interface ReduxDevToolsFeaturesOptions { - /** Start/pause recording of dispatched actions */ - pause?: boolean; - /** Lock/unlock dispatching actions and side effects */ - lock?: boolean; - /** Persist states on page reloading */ - persist?: boolean; - /** Export history of actions in a file */ - export?: boolean | 'custom'; - /** Import history of actions from a file */ - import?: boolean | 'custom'; - /** Jump back and forth (time travelling) */ - jump?: boolean; - /** Skip (cancel) actions */ - skip?: boolean; - /** Drag and drop actions in the history list */ - reorder?: boolean; - /** Dispatch custom actions or action creators */ - dispatch?: boolean; - /** Generate tests for the selected actions */ - test?: boolean; -} - -export interface ReduxDevToolsOptions { - /** The instance name to be showed on the monitor page. */ - name?: string; - /** Action creators functions to be available in the dispatcher. */ - actionCreators?: Array> | ActionCreatorsMapObject; - /** - * If more than one action is dispatched in the indicated interval in ms, - * all new actions will be collected and sent at once. It is the joint - * between performance and speed. When set to `0`, all actions will be sent - * instantly. Set it to a higher value when experiencing perf issues (also - * `maxAge` to a lower value). - */ - latency?: number; - /** - * Maximum allowed actions to be stored in the history tree. The oldest - * actions are removed once `maxAge` is reached. It's critical for - * performance. - */ - maxAge?: number; - /** Serialization options. */ - serialize?: ReduxDevToolsSerializeOptions; - /** - * Function which takes `action` object as argument, and should return - * `action` object back. - */ - actionSanitizer?(action: any): any; - /** - * Function which takes `state` object as argument, and should return - * `state` object back. - */ - stateSanitizer?(state: any): any; - /** - * Actions types to be hidden in the monitors (while passed to the - * reducers). If `actionsWhitelist` specified, `actionsBlacklist` is ignored. - */ - actionsBlacklist?: string | string[]; - /** - * Actions types to be shown in the monitors (while passed to the reducers). - * If `actionsWhitelist` specified, `actionsBlacklist` is ignored. - */ - actionsWhitelist?: string | string[]; - /** - * Called for every action before sending, takes `state` and `action` - * object, and returns `true` in case it allows sending the current data to - * the monitor. Use it as a more advanced version of - * `actionsBlacklist`/`actionsWhitelist` parameters. - */ - predicate?(state: any, action: any): boolean; - /** - * If specified as `false`, it will not record the changes till clicking on - * *Start recording* button. Available only for Redux enhancer, for others - * use `autoPause`. - */ - shouldRecordChanges?: boolean; - /** - * If specified, whenever clicking on *Pause recording* button and there are - * actions in the history log, will add this action type. If not specified, - * will commit when paused. Available only for Redux enhancer. - */ - pauseActionType?: string; - /** - * Auto-pauses when the extension’s window is not opened, and so has zero - * impact on your app when not in use. Not available for Redux enhancer (as - * it already does it but storing the data to be sent). - */ - autoPause?: boolean; - /** - * If specified as `true`, it will not allow any non-monitor actions to be - * dispatched till clicking on *Unlock changes* button. Available only for - * Redux enhancer. - */ - shouldStartLocked?: boolean; - /** - * If set to `false`, will not recompute the states on hot reloading (or on - * replacing the reducers). Available only for Redux enhancer. - */ - shouldHotReload?: boolean; - /** - * If specified as `true`, whenever there's an exception in reducers, the - * monitors will show the error message, and next actions will not be - * dispatched. - */ - shouldCatchErrors?: boolean; - /** - * If you want to restrict the extension, just specify the features you - * allow. - */ - features?: ReduxDevToolsFeaturesOptions; -} - -export function composeWithDevTools(options?: ReduxDevToolsOptions): (...funcs: GenericStoreEnhancer[]) => GenericStoreEnhancer; -export function composeWithDevTools(...funcs: GenericStoreEnhancer[]): GenericStoreEnhancer; diff --git a/types/redux-devtools-extension/package.json b/types/redux-devtools-extension/package.json deleted file mode 100644 index 36ce503807..0000000000 --- a/types/redux-devtools-extension/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "redux": "^3.6.0" - } -} diff --git a/types/redux-devtools-extension/redux-devtools-extension-tests.ts b/types/redux-devtools-extension/redux-devtools-extension-tests.ts deleted file mode 100644 index 45ac5c2651..0000000000 --- a/types/redux-devtools-extension/redux-devtools-extension-tests.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { - Action, - Middleware, - Reducer, - applyMiddleware, - createStore -} from 'redux'; -import { composeWithDevTools } from 'redux-devtools-extension'; - -const composeEnhancers = composeWithDevTools(); - -const reducer: Reducer<{}> = () => ({}); -const middleware: Middleware[] = []; -const store = createStore(reducer, composeEnhancers( - applyMiddleware(...middleware) -)); - -const store2 = createStore(reducer, composeWithDevTools({ - serialize: { - options: { - undefined: true, - function: (fn: any) => fn.toString() - } - } -})); - -const store3 = createStore(reducer, composeWithDevTools({ - serialize: { - replacer: (key, value) => 'foo' - } -})); - -const store4 = createStore(reducer, composeWithDevTools({ - serialize: { - replacer: (key, value) => 'bar' - } -})); - -const store5 = createStore(reducer, composeWithDevTools({ - serialize: { - reviver: (key, value) => 'baz' - } -})); - -const store6 = createStore(reducer, composeWithDevTools({ - serialize: { - immutable: /* Immutable */ {} - } -})); - -const store7 = createStore(reducer, composeWithDevTools({ - serialize: { - immutable: /* Immutable */ {}, - refs: [/* Record */ {}] - } -})); - -const store8 = createStore(reducer, composeWithDevTools({ - actionSanitizer: (action) => action, - stateSanitizer: (state) => state -})); - -const store9 = createStore(reducer, composeWithDevTools({ - actionsBlacklist: 'SOME_ACTION' -})); - -const store10 = createStore(reducer, composeWithDevTools({ - predicate: (state, action) => state.dev.logLevel === 'VERBOSE' && !action.forwarded -})); - -const store11 = createStore(reducer, composeWithDevTools({ - shouldRecordChanges: true, - pauseActionType: '@@PAUSE', - autoPause: true, - shouldStartLocked: true, - shouldHotReload: true, - shouldCatchErrors: true, - features: { - pause: true, // start/pause recording of dispatched actions - lock: true, // lock/unlock dispatching actions and side effects - persist: true, // persist states on page reloading - export: 'custom', // export history of actions in a file - import: 'custom', // import history of actions from a file - jump: true, // jump back and forth (time travelling) - skip: true, // skip (cancel) actions - reorder: true, // drag and drop actions in the history list - dispatch: true, // dispatch custom actions or action creators - test: true // generate tests for the selected actions - } -})); diff --git a/types/redux-devtools-extension/tsconfig.json b/types/redux-devtools-extension/tsconfig.json deleted file mode 100644 index 6d8d644ea6..0000000000 --- a/types/redux-devtools-extension/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "redux-devtools-extension-tests.ts" - ] -} diff --git a/types/redux-devtools-extension/tslint.json b/types/redux-devtools-extension/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/redux-devtools-extension/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }