From 8705a4b3534eb1b70c016d6d1fa692650d4e519d Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Wed, 7 Dec 2016 19:02:53 +0000 Subject: [PATCH] Remove redux-typed from source tree. It's no longer in use and doesn't need to be maintained. Source can be re-added in the future if needed. --- .../npm/redux-typed/.gitignore | 3 -- .../npm/redux-typed/.npmignore | 3 -- .../npm/redux-typed/LICENSE.txt | 12 ------ .../npm/redux-typed/README.md | 1 - .../npm/redux-typed/package.json | 27 ------------ .../redux-typed/src/ObjectAssignPolyfill.ts | 24 ----------- .../npm/redux-typed/src/StrongActions.ts | 42 ------------------- .../npm/redux-typed/src/StrongProvide.ts | 22 ---------- .../npm/redux-typed/src/main.ts | 2 - .../npm/redux-typed/tsconfig.json | 16 ------- 10 files changed, 152 deletions(-) delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.gitignore delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.npmignore delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/LICENSE.txt delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/README.md delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/package.json delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/ObjectAssignPolyfill.ts delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/StrongActions.ts delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/StrongProvide.ts delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/main.ts delete mode 100644 src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/tsconfig.json diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.gitignore b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.gitignore deleted file mode 100644 index 025755a..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/node_modules/ -/*.js -/*.d.ts diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.npmignore b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.npmignore deleted file mode 100644 index 858cdc4..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -!/*.js -!/*.d.ts -/typings/ diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/LICENSE.txt b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/LICENSE.txt deleted file mode 100644 index 0bdc196..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/LICENSE.txt +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) .NET Foundation. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -these files except in compliance with the License. You may obtain a copy of the -License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/README.md b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/README.md deleted file mode 100644 index 1333ed7..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/README.md +++ /dev/null @@ -1 +0,0 @@ -TODO diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/package.json b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/package.json deleted file mode 100644 index a240b79..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "redux-typed", - "version": "2.0.0", - "description": "Helpers for building React+Redux apps with strong TypeScript type checking everywhere", - "main": "main.js", - "typings": "main.d.ts", - "scripts": { - "prepublish": "rimraf *.d.ts && tsc && echo 'Finished building NPM package \"redux-typed\"'", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "Microsoft", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/aspnet/JavaScriptServices/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/aspnet/JavaScriptServices.git" - }, - "devDependencies": { - "@types/react": "^0.14.38", - "@types/react-redux": "^4.4.32", - "@types/redux": "^3.5.30", - "rimraf": "^2.5.4", - "typescript": "^2.0.0" - } -} diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/ObjectAssignPolyfill.ts b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/ObjectAssignPolyfill.ts deleted file mode 100644 index 867e888..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/ObjectAssignPolyfill.ts +++ /dev/null @@ -1,24 +0,0 @@ -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign -if (typeof (Object).assign != 'function') { - (function () { - (Object).assign = function (target) { - 'use strict'; - if (target === undefined || target === null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - - var output = Object(target); - for (var index = 1; index < arguments.length; index++) { - var source = arguments[index]; - if (source !== undefined && source !== null) { - for (var nextKey in source) { - if (source.hasOwnProperty(nextKey)) { - output[nextKey] = source[nextKey]; - } - } - } - } - return output; - }; - })(); -} diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/StrongActions.ts b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/StrongActions.ts deleted file mode 100644 index f14c912..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/StrongActions.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Credits for the type detection technique: http://www.bluewire-technologies.com/2015/redux-actions-for-typescript/ -import * as React from 'react'; -import { Dispatch } from 'redux'; -import './ObjectAssignPolyfill'; - -export interface ActionClass { - prototype: T; -} - -export function typeName(name: string) { - return function(actionClass: ActionClass) { - // Although we could determine the type name using actionClass.prototype.constructor.name, - // it's dangerous to do that because minifiers may interfere with it, and then serialized state - // might not have the expected meaning after a recompile. So we explicitly ask for a name string. - actionClass.prototype.type = name; - } -} - -export function isActionType(action: Action, actionClass: ActionClass): action is T { - return action.type == actionClass.prototype.type; -} - -// Middleware for transforming Typed Actions into plain actions -export const typedToPlain = (store: any) => (next: any) => (action: any) => { - next((Object).assign({}, action)); -}; - -export abstract class Action { - type: string; - constructor() { - // Make it an own-property (not a prototype property) so that it's included when JSON-serializing - this.type = this.type; - } -} - -export interface Reducer extends Function { - (state: TState, action: Action): TState; -} - -export interface ActionCreatorGeneric extends Function { - (dispatch: Dispatch, getState: () => TState): any; -} diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/StrongProvide.ts b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/StrongProvide.ts deleted file mode 100644 index 709683f..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/StrongProvide.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as React from 'react'; -import { connect as nativeConnect } from 'react-redux'; - -export type ReactComponentClass = new(props: T) => React.Component; -export class ComponentBuilder { - constructor(private stateToProps: (appState: any) => TOwnProps, private actionCreators: TActions) { - } - - public withExternalProps() { - return this as any as ComponentBuilder; - } - - public get allProps(): TOwnProps & TActions & TExternalProps { return null; } - - public connect(componentClass: ReactComponentClass): ReactComponentClass { - return nativeConnect(this.stateToProps, this.actionCreators as any)(componentClass) as any; - } -} - -export function provide(stateToProps: (appState: any) => TOwnProps, actionCreators: TActions) { - return new ComponentBuilder(stateToProps, actionCreators); -} diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/main.ts b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/main.ts deleted file mode 100644 index fde5f8f..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/src/main.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './StrongActions'; -export * from './StrongProvide'; diff --git a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/tsconfig.json b/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/tsconfig.json deleted file mode 100644 index 0617341..0000000 --- a/src/Microsoft.AspNetCore.ReactServices/npm/redux-typed/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "module": "commonjs", - "target": "es5", - "declaration": true, - "outDir": ".", - "lib": ["es2015", "dom"] - }, - "files": [ - "src/main.ts" - ], - "exclude": [ - "node_modules" - ] -}