Files
speckle-server/packages/frontend-2/lib/common/helpers/sceneExplorer.ts
T
Kristaps Fabians Geikins b02a07e2b6 feat: Frontend 2.0 MVP
2023-05-08 10:47:01 +03:00

25 lines
542 B
TypeScript

// Note: minor typing hacks for less squiggly lines in the explorer.
// TODO: ask alex re viewer data tree types
export type ExplorerNode = {
guid?: string
data?: SpeckleObject
raw?: SpeckleObject
atomic?: boolean
model?: Record<string, unknown>
children: ExplorerNode[]
}
export type SpeckleReference = {
referencedId: string
}
export interface SpeckleObject {
id?: string
elements?: SpeckleReference[]
children?: SpeckleObject[] | SpeckleReference[]
name?: string
speckle_type?: string
[key: string]: unknown
}