Skip to content

add interface when necessary (you can have a look at the typescript cheatsheet) #60

Description

@flexbox

This is nice 88d45f8 👏

But if we really want to have Typescript support to respect the first step of pyramid testing in JavaScript, we should add type-check

image
https://testingjavascript.com/

Example for single.tsx:

image

we can add

interface SingleProps {
  pageContext: any,   <--- this is not ideal but leave any for now :)
  title: string,
  twitterName?: string,
  location: string,
}

function singleQuote(props: SingleProps) {
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions