Skip to content

Visualize Your Ideas With Code

docs: use correct return type for flicker function (#460)

Kai Sassnowski81f02cd3db0f
diff --git a/packages/docs/docs/getting-started/flow.mdx b/packages/docs/docs/getting-started/flow.mdx
index 7ea0e135..a45739ad 100644
--- a/packages/docs/docs/getting-started/flow.mdx
+++ b/packages/docs/docs/getting-started/flow.mdx
@@ -62,6 +62,8 @@ For instance, we could extract the flickering code from the above example to a
separate generator and delegate our scene function to it:
```tsx
+import {ThreadGenerator} from '@motion-canvas/core/lib/threading';
+
export default makeScene2D(function* (view) {
const circle = createRef<Circle>();
view.add(<Circle ref={circle} width={100} height={100} />);
@@ -69,7 +71,7 @@ export default makeScene2D(function* (view) {
yield* flicker(circle());
});
-function* flicker(circle: Circle): Generator {
+function* flicker(circle: Circle): ThreadGenerator {
circle.fill('red');
yield;
circle.fill('blue');