// If you don't want to use TypeScript you can delete this file! import * as React from "react" import { PageProps, Link, graphql, HeadFC } from "gatsby" import Layout from "../components/layout" import Seo from "../components/seo" type DataProps = { site: { buildTime: string } } const UsingTypescript: React.FC> = ({ data, location, }) => (

Gatsby supports TypeScript by default

This means that you can create and write .ts/.tsx files for your pages, components, and gatsby-* configuration files (for example gatsby-config.ts).

For type checking you'll want to install typescript via npm and run tsc --init to create a tsconfig file.

You're currently on the page {location.pathname} which was built on {data.site.buildTime}.

To learn more, head over to our{" "} documentation about TypeScript .

Go back to the homepage
) export const Head: HeadFC = () => export default UsingTypescript export const query = graphql` { site { buildTime(formatString: "YYYY-MM-DD hh:mm a z") } } `