Comments (8)
Can you be more specific? Do you mean logic to check the incoming arguments, or using something like typescript or flow? Or do you mean something else?
from just.
I am using typescript with angular 2. So I did import the module, but it requires 'typings' for the same.
Hence was asking, whether you'll be supporting it.
It is a type description of all the methods. Can check lodash, node for reference.
from just.
Yup. TypeScript types. Would like them, as well. I am looking for an alternative to lodash.keyBy
, exactly because its typings seem unsatisfactory to me. just-index
seems like what I'm looking for, but it has no typings.
I think the easiest and most fail-safe way to have typings is to rewrite in TypeScript. But that is radical and if the developer is fond of TypeScript he would have done it by now, probably.
from just.
Would adding Just here be a workaround? https://github.com/DefinitelyTyped/DefinitelyTyped
from just.
Yup. It would. I never did that, but I imagine it to be quite meticulous and error prone. I seriously don't know how types are manually made for codes as complex lodash, for example. But they are. I bet there are some tips and tricks that come with experience. Seems a bit overwhelming to me. That's why I would suggest converting to TypeScript and letting the compiler produce correct typings for the project.
from just.
I would consider a TypeScript rewrite if I was already transpiling. One of the biggest benefits of writing Just in ES5 (and without dependencies) is I don't need a transpiler. This is invaluable in terms of import cost, debuggability and predictability.
from just.
No kind of pressure from me at all here, @angus-c. Just sharing that from my experience with TypeScript, it contributes to predictability.
Debugging involves source maps, if you wish. But you could always turn them off and debug the end product. Since you're not interested in down-transpilation from new to old ES, then the end product is pretty much the source minus the types.
from just.
Yeah I get that (and have used source maps a lot in other projects. I love ES2015+, it's just liberating not to use it in the case of this project since it gives me much more control over performance and size, versus deferring to babel) and I do agree that TS doesn't add transpile bloat, unlike babel/webpack.
One further consideration, I've added a lot of manual type checks for arguments which I would have to keep in addition to TS annotations since many won't be using Just in TS apps.
from just.
Related Issues (20)
- Permutations gives incorrect result for arrays of arrays
- just-safe-set docs do not agree with implementation HOT 2
- [BUG] After `diff(object, master);` - master changed
- [just-rotate-right] Rotate array elements to the right
- [just-omit] webpack import error HOT 3
- just-diff Error when first diff is a complex array mutation
- [just-diff] op type error.I add a new property with an empty string,but the op is replace HOT 1
- Website missing one-line descriptions for each library
- `just-is-empty` function fails to detect symbol properties in objects
- Proposal: `hasOnly` object utility
- safe-set sorting bug
- Types of just-diff and just-diff-apply do not match HOT 1
- `just-standard-deviation` and `just-skewness` require 2 numbers in the array HOT 1
- Could not find a declaration file for module `just-pipe` HOT 1
- flatten with depth=1 is not properly applied to the first element HOT 1
- function just-diff is buggy when dealing with empty objects with no prototype
- just-intersect is mixing array and strings HOT 3
- Can just-debounce-it run the first and last call?
- just-debounce-it, types and async functions HOT 1
- string-template can't return number 0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from just.