Skip to content

Add explicit return-type annotations to NotionBlocks and JsonLdScript exported components #90

@ooloth

Description

@ooloth

Why

NotionBlocks and JsonLdScript are exported components at public API boundaries with no return-type annotation, so callers cannot understand the contract from the signature alone and must read the function body.

Current state

io/notion/ui/NotionBlocks.tsx line 13 exports function NotionBlocks({ blocks }: Props) with no return type. seo/json-ld/script.tsx line 20 exports function JsonLdScript(props: JsonLdScriptProps) with no return type. Both are at public module boundaries.

Ideal state

  • Both functions carry explicit return types (ReactElement or JSX.Element as appropriate).
  • A reader can understand each function's contract from the signature without reading the body.
  • The return type serves as a compiler-checked contract assertion.

Starting points

  • io/notion/ui/NotionBlocks.tsx — line 13
  • seo/json-ld/script.tsx — line 20

QA plan

  1. Open both files and verify each function signature includes a return type annotation.
  2. Change the return type to an incompatible type — expect a compile error.
  3. Run tsc --noEmit — expect no type errors.

Done when

Both NotionBlocks and JsonLdScript have explicit return-type annotations and the return types are verified by the TypeScript compiler.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions