Skip to content

Commit

Permalink
Merge pull request #28 from phenax/revert-8-feature/ts_typings
Browse files Browse the repository at this point in the history
Revert "Adds typescript typings support"
  • Loading branch information
phenax authored Feb 23, 2020
2 parents 7314792 + 0c08e2b commit 8692904
Show file tree
Hide file tree
Showing 65 changed files with 783 additions and 2,195 deletions.
7 changes: 2 additions & 5 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
- [x] Clone/Extend effect interface with new name.
- [x] "global" handlers to generic effects
- [x] Support try-catch inside program
- [x] Typescript types
- [ ] Stateful/parameterized states (to avoid the second parameter to .of method of State)
- [ ] Typescript types
- [ ] ?Redux middleware

**Multiple continuations**
Expand All @@ -32,9 +32,6 @@
- [x] Cancellation handler
- [x] Allow cancellation from within

**Observable**
- [ ] Implement observable monad to be used instead of Task monad

**Add more effects ...**
- [x] Exception
- [x] State
Expand Down Expand Up @@ -79,5 +76,5 @@
### Scripts and doc builder
- [x] Version upgrade in publish script should upgrade matching dependencies as well
- [x] Build and publish ae-docs as html github pages. (Maybe mdx?)
- [ ] ?Mobile issues (not confirmed yet)
- [ ] ?Mobile issues (not confirmed yet)
- [ ] Docs issue with scrolling to link hook. (Should attempt scrolling after page load)
6 changes: 2 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
module.exports = {
'presets': [
// '@babel/preset-typescript',
'@babel/preset-env',
],
'plugins': [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-typescript',
'@babel/plugin-proposal-class-properties'
]
};
};
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
"docs": "node ./scripts/docs.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.8.4",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/preset-env": "^7.8.4",
"@babel/preset-typescript": "^7.8.3",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.2.3",
"@babel/preset-env": "^7.2.3",
"@mdx-js/loader": "^0.16.8",
"@mdx-js/runtime": "^0.16.8",
"@types/node": "^10.12.21",
Expand All @@ -36,7 +35,7 @@
"babel-polyfill": "^6.26.0",
"babel-preset-react-app": "^7.0.0",
"chalk": "^2.4.2",
"codecov": "^3.6.5",
"codecov": "^3.1.0",
"eslint": "^5.12.0",
"eslint-plugin-react": "^7.12.4",
"fs-extra": "^7.0.1",
Expand All @@ -52,8 +51,8 @@
"remark-slug": "^5.1.1",
"styled-components": "^4.1.3",
"terser-webpack-plugin": "^1.2.1",
"ts-loader": "^6.2.1",
"typescript": "^3.8.2",
"ts-loader": "^5.3.3",
"typescript": "^3.3.1",
"webpack": "^4.29.0"
}
}
}
26 changes: 13 additions & 13 deletions packages/ae-core/build/generic.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.createGenericEffect = exports.background = exports.parallel = exports.race = exports.callMulti = exports.call = exports.runTask = exports.awaitPromise = exports.cancel = exports.resolve = exports.sleep = void 0;
exports.default = exports.createGenericEffect = exports.background = exports.parallel = exports.race = exports.callMulti = exports.call = exports.runTask = exports.awaitPromise = exports.cancel = exports.resolve = exports.sleep = void 0;

var _fns = require("@algebraic-effects/task/fns");

Expand Down Expand Up @@ -66,40 +66,40 @@ var genericOpHandlers = {
};
}
};
var sleep = (0, _utils2.createOperation)('sleep', (0, _utils2.func)(['duration']));
var sleep = (0, _utils2.Operation)('sleep', (0, _utils2.func)(['duration']));
exports.sleep = sleep;
var resolve = (0, _utils2.createOperation)('resolve', (0, _utils2.func)(['*']));
var resolve = (0, _utils2.Operation)('resolve', (0, _utils2.func)(['*']));
exports.resolve = resolve;
var cancel = (0, _utils2.createOperation)('cancel', (0, _utils2.func)(['*']));
var cancel = (0, _utils2.Operation)('cancel', (0, _utils2.func)(['*']));
exports.cancel = cancel;
var awaitPromise = (0, _utils2.createOperation)('awaitPromise', (0, _utils2.func)(['promise e a'], 'a'));
var awaitPromise = (0, _utils2.Operation)('awaitPromise', (0, _utils2.func)(['promise e a'], 'a'));
exports.awaitPromise = awaitPromise;
var runTask = (0, _utils2.createOperation)('runTask', (0, _utils2.func)(['task e a'], 'a'));
var runTask = (0, _utils2.Operation)('runTask', (0, _utils2.func)(['task e a'], 'a'));
exports.runTask = runTask;
var call = (0, _utils2.createOperation)('call', (0, _utils2.func)(['generator ...a b', '...a'], 'b'));
var call = (0, _utils2.Operation)('call', (0, _utils2.func)(['generator ...a b', '...a'], 'b'));
exports.call = call;
var callMulti = (0, _utils2.createOperation)('callMulti', (0, _utils2.func)(['generator ...a b', '...a'], 'b', {
var callMulti = (0, _utils2.Operation)('callMulti', (0, _utils2.func)(['generator ...a b', '...a'], 'b', {
isMulti: true
}));
exports.callMulti = callMulti;
var race = (0, _utils2.createOperation)('race', (0, _utils2.func)(['...(generator ...a b)'], 'b', {
var race = (0, _utils2.Operation)('race', (0, _utils2.func)(['...(generator ...a b)'], 'b', {
isMulti: true
}));
exports.race = race;
var parallel = (0, _utils2.createOperation)('parallel', (0, _utils2.func)(['...(generator ...a b)'], '[b]', {
var parallel = (0, _utils2.Operation)('parallel', (0, _utils2.func)(['...(generator ...a b)'], '[b]', {
isMulti: true
}));
exports.parallel = parallel;
var background = (0, _utils2.createOperation)('background', (0, _utils2.func)(['...(generator ...a b)'], '[b]', {
var background = (0, _utils2.Operation)('background', (0, _utils2.func)(['...(generator ...a b)'], '[b]', {
isMulti: true
}));
exports.background = background;

var createGenericEffect = function createGenericEffect(name, signature, handler) {
genericOpHandlers[name] = handler;
return (0, _utils2.createOperation)(name, signature);
return (0, _utils2.Operation)(name, signature);
};

exports.createGenericEffect = createGenericEffect;
var _default = genericOpHandlers;
exports["default"] = _default;
exports.default = _default;
Loading

0 comments on commit 8692904

Please sign in to comment.