Coder Social home page Coder Social logo

typed-unmaintained's Introduction

Tylor Steinberger

I'm a self-taught engineer with a passion for learning, creating, and contributing. I'm an Open Source Enthusiast; Author of Motorcycle.ts, Typed; Contributor to Effect, Cycle, Most, and Snabbdom among maintaining and contributing to numerous other open-source libraries you'll find across my profile.

Software is my passion, and I want to build tools for the future.

TylorS' Github Status

My GitHub Streak

typed-unmaintained's People

Contributors

briancavalier avatar renovate-bot avatar renovate[bot] avatar sinewyk avatar tylors avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

typed-unmaintained's Issues

Maybe.of vs toMaybe

I was looking through the source code and saw that Maybe.of is an alias for Just.of, and toMaybe does a null check before either returning a Nothing, or passing the result to Maybe.of/Just.of.

I was expecting Maybe.of to also do the null check and return a Nothing or a Just.

Is there a standard way of thinking about of and toXYZ in these kinds of datatypes in FP in general?

Learning resources

Do you have a blog post that shows how one would use your libraries? I was thinking of using a Maybe for a situation where I was originally using a ternary expression that returned an object or undefined. I think this might be a good candidate. I'm really trying to refactor some of my code to be more functional, and any resources you have may be of great help.

Thanks again for making such an awesome suite of libraries, I cant wait to share this with some of my friends! 👍

Can't `.map` output from groupBy

groupBy casts its value output as ArrayLike (via List), which lacks operators like map, filter, reduce, etc. Is there a reason for this, or another recommended way to be able to do something similar to the below?

const toGroup = [....];
const grouped = groupBy((item) => ..., toGroup);
grouped.exampleGroupKey.map(x => ...);

Issue importing from @typed/objects

👋 Hi, awesome library, found this after fighting with the typings for ramda.

While importing prop and set I keep getting errors in my compiled code pointing to prop and set being undefined.

I believe hasOwnProperty is causing issues in the @typed/objects package when compiled from typescript to javascript.

function __export(m) {
  for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]
}
Object.defineProperty(exports, '__esModule', { value: true })
__export(require('./clone'))
__export(require('./hasOwnProperty'))
__export(require('./invoker'))
// ...etc

I stepped through this code and noticed that everything after calling __export on hasOwnProperty isn't added to the exports object.

I believe this is because the native hasOwnProperty implementation on the exports object is being replaced by the curried hasOwnProperty function provided by @typed/objects. The check then fails since a function is always returned. I think a quick fix would be moving the export hasOwnProperty to the end of the exports in https://github.com/TylorS/typed/blob/master/packages/objects/src/index.ts

If you'd like a minimal reproducible repo I can provide one. I can also put up a quick PR to move the export if you'd like.

Rename "seed" to "accumulator" in Reducer type signature

The type definition for reduce() in @typed/prelude does not match the type definition for reduce() in @typed/list.

@typed/list:

export declare type Reducer<A, B> = (seed: B, value: A, index: number) => B;
export declare type ReduceArity3 = {
    <A, B>(f: Reducer<A, B>, seed: B, list: List<A>): B;
    <A, B>(f: Reducer<A, B>, seed: B): ReduceArity1<A, B>;
    <A, B>(f: Reducer<A, B>): ReduceArity2<A, B>;
};
export declare type ReduceArity2<A, B> = {
    (seed: B, list: List<A>): B;
    (seed: B): ReduceArity1<A, B>;
};
export declare type ReduceArity1<A, B> = {
    (list: List<A>): B;
};

@typed/prelude:

export function reduce<A, B>(f: (acc: A, val: B) => A, seed: A, arr: B[]): A

The “prelude”-reduce doesn’t allow ReadonlyArrays as lists, for example.

In addition, it seems incorrect to call the first parameter of the Reducer for seed. To my knowledge, it is common to call it accumulator or just acc. It is, however, correct to call it seed in the reduce.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.