github.com/jbendotnet/noms@v0.0.0-20190904222105-c43e4293ea92/cmd/noms/splore/src/types.js (about)

     1  // Copyright 2017 Attic Labs, Inc. All rights reserved.
     2  // Licensed under the Apache License, version 2.0:
     3  // http://www.apache.org/licenses/LICENSE-2.0
     4  
     5  // @flow
     6  
     7  export type NodeGraph = {
     8    keyLinks: {[key: string]: string[]},
     9    links: {[key: string]: string[]},
    10    nodes: {[key: string]: SploreNode},
    11    open: {[key: string]: boolean},
    12  };
    13  
    14  // See node and nodeInfo in noms_splore.go
    15  // The types are unioned here for simplicity.
    16  export type SploreNode = {
    17    children?: SploreNodeChild[], // only in node, not nodeInfo
    18    hasChildren: boolean,
    19    id: string,
    20    name: string,
    21  };
    22  
    23  // See nodeChild in noms_splore.go
    24  export type SploreNodeChild = {
    25    key: SploreNode,
    26    label: string,
    27    value: SploreNode,
    28  };