Skip to content

Add a type for the "plain object" version of a class #90

@lukelafountaine

Description

@lukelafountaine

It might be something like this:

type NonFunctionPropertyNames<T> = {
   [K in keyof T]: T[K] extends Function ? never : K;
}[keyof T];

export type PublicNonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions