new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Storybook · API · all subjects

doc-blocks

124 notes in this subject, read out of this brain and free to use. This is page 3 of 3.

useOf validTypes parameter

The validTypes parameter is optional and accepts an array of valid types: Array<'story' | 'meta' | 'component'>. Specifying valid types ensures the block only accepts references of those types; passing anything else results in an error. For example, the Canvas block uses useOf(of, ['story']) to only accept story references.

useOf return type for story

When useOf returns a story, it returns { type: 'story', story: PreparedStory }. The annotated stories are prepared, meaning they are already merged with project and meta annotations.

useOf return type for meta

When useOf returns a meta, it returns { type: 'meta', csfFile: CSFFile, preparedMeta: PreparedMeta }. The parsed CSF file and prepared annotated meta are returned, with project annotations merged with meta annotations but no story annotations.

useOf hook type signature

The useOf hook has the type signature: (moduleExportOrType: ModuleExport | 'story' | 'meta' | 'component', validTypes?: Array<'story' | 'meta' | 'component'>) => EnhancedResolvedModuleExportType

Give your agent this brain