Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Add better copy method to data classes #42

@atollk

Description

@atollk

For Kotlin data classes, JsExport generates a copy that basically has the same signature as the Kotlin method, i.e. one parameter for each class property. The problem is that JS and TS do not support named arguments, so you always have to specify all parameters. The typical way to simulate this behavior in JS is to use single parameter functions which take in a single object and that object represents a map of parameter names to values.

It seems like a nice feature, if KustomExport could generate alternative copy methods for data classes that are represented by this type of method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions