Skip to content

Object.assign over functions breaks #71

@simon-abbott

Description

@simon-abbott

When using better-typescript-lib v2.11.0, passing a function to Object.assign breaks TS callability inference.

This code works fine in base TS, and runs perfectly, but it breaks the build with better-typescript-lib:

const foo = () => 1;
const bar = Object.assign(foo, { baz: 1 });
bar();

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions