roadmap question: rtype builtins
See original GitHub issueI was thinking about taking a crack at this, but I’m not sure I understand what this bullet point is, exactly.
I assume this is pre-parser, and is for building predicates in JavaScript.
e.g.
import { isAny, isArray, isBoolean, isFunction, isNumber, isObject, isString, isVoid } from 'rfx-builtins';
import rfx from 'rfx';
const type = (param, otherParam, options) => (
isString(param) &&
isArray(otherParam) &&
/* ... (Type checking optional and neatly separated!) */
);
export const myFunction = (param, otherParam, options) => {
/* (Just business logic.) */
}
export const myInterface = rfx({
type,
fn: myFunction
});
Is this pretty much what you were expecting? The exported predicate names can’t literally be the same as the built-in names, so I just went with a conventional (to me) is...
prefix.
Also, have you seen this type checking library? https://github.com/enricomarino/is Would it be appropriate to just extract the builtin-related functions from that (it’s also MIT licensed)?
Issue Analytics
- State:
- Created 8 years ago
- Comments:21 (14 by maintainers)
Top Results From Across the Web
Top 10 Most Frequently Asked Product Roadmap Questions
There are also many ways roadmaps get used once they're built. We're answering the top ten questions on our favorite product management process,...
Read more >5 common product roadmap questions - YouTube
5 common product roadmap questionsRoadmunk's co-founder and CEO Latif Nanji answers some common product roadmap questions.
Read more >glue.viewers.common.qt.data_viewer — Glue 0.8.2 documentation
def _confirm_close(self): """Ask for close confirmation :rtype: bool. ... QMessageBox.question(self, title, warn_msg, buttons=buttons, defaultButton=cancel) ...
Read more >Key Questions to Ask When Building Your Product Roadmap
Product roadmaps are only as good as the information they're based on. Make sure you get yours right by asking the right questions....
Read more >[PDF] Alterations of the Sympathoadrenal Axis Related to the ...
... is becoming a global health problem and public health priority. ... R-Type Ca2+Channels Are Coupled to the Rapid Component of Secretion in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Anyway, 👍 to not supporting IE <11. How about mentioninig it in the docs?
Closing because type check implementations are out of scope for rfx.
rfx is just a way to tag interfaces with type information. See rtype for actual type checking code.