question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

roadmap question: rtype builtins

See original GitHub issue

I 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:closed
  • Created 8 years ago
  • Comments:21 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
tomek-he-himcommented, Dec 5, 2015

Anyway, 👍 to not supporting IE <11. How about mentioninig it in the docs?

0reactions
ericelliottcommented, Apr 17, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found