Chore: Simplified ISheet's signature
This commit is contained in:
parent
d161703c20
commit
2a671b129d
11 changed files with 125 additions and 138 deletions
|
@ -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'
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"name": "theatre",
|
||||
"private": true,
|
||||
"version": "0.4.0-dev.3",
|
||||
"workspaces": [
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue