Chore: Simplified ISheet's signature

This commit is contained in:
Aria Minaei 2021-07-03 15:36:00 +02:00
parent d161703c20
commit 2a671b129d
11 changed files with 125 additions and 138 deletions

View file

@ -13,9 +13,7 @@ import userReadableTypeOfValue from '@theatre/shared/utils/userReadableTypeOfVal
export type SheetObjectConfig<
Props extends PropTypeConfig_Compound<$IntentionalAny>,
> = {
props: Props
}
> = Props
export interface ISheet {
readonly type: 'Theatre_Sheet_PublicAPI'

View file

@ -1,4 +1,5 @@
{
"name": "theatre",
"private": true,
"version": "0.4.0-dev.3",
"workspaces": [

View file

@ -27,15 +27,17 @@ export async function setupTestSheet(sheetState: SheetState_Historic) {
ticker.tick()
await project.ready
const sheetPublicAPI = project.sheet('Sheet')
const objPublicAPI = sheetPublicAPI.object('obj', null, {
props: t.compound({
const objPublicAPI = sheetPublicAPI.object(
'obj',
null,
t.compound({
position: t.compound({
x: t.number(0),
y: t.number(1),
z: t.number(2),
}),
}),
})
)
const obj = privateAPI(objPublicAPI)

View file

@ -1,5 +1,5 @@
import type {PropTypeConfig_Compound} from '@theatre/core/propTypes'
import {isPropConfigComposite} from '@theatre/shared/src/propTypes/utils'
import {isPropConfigComposite} from '@theatre/shared/propTypes/utils'
import type SheetObject from '@theatre/core/sheetObjects/SheetObject'
import {theme} from '@theatre/studio/css'
import {voidFn} from '@theatre/shared/utils'

View file

@ -4,7 +4,7 @@ import type {
PropTypeConfig_AllPrimitives,
PropTypeConfig_Compound,
} from '@theatre/core/propTypes'
import {isPropConfigComposite} from '@theatre/shared/src/propTypes/utils'
import {isPropConfigComposite} from '@theatre/shared/propTypes/utils'
import type SheetObject from '@theatre/core/sheetObjects/SheetObject'
import type {IPropPathToTrackIdTree} from '@theatre/core/sheetObjects/SheetObjectTemplate'
import type Sheet from '@theatre/core/sheets/Sheet'