Skip to content

react-json-tree NodeType definition #659

Open
@paztis

Description

@paztis

Currently NodeType is only defined as a String
It can be great to have a constants / enum definition to avoid to hardcode their usage in our project, like this:

export enum NodeType {
    Object ='Object',
    Error ='Error',
    WeakMap = 'WeakMap',
    WeakSet = 'WeakSet',
    Array = 'Array',
    Iterable = 'Iterable',
    Map = 'Map',
    Set = 'Set',
    String = 'String',
    Number = 'Number',
    Boolean = 'Boolean',
    Date ='Date',
    Null = 'Null',
    Undefined = 'Undefined',
    Function = 'Function',
    Symbol = 'Symbol',
    Custom = 'Custom'
}

I found these list of names by searching in your source code. even not sure I've found all the cases

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions