Make sure you reference the oatmilk library somewhere in a .d.ts
file. With create-react-app, this should be src/react-app-env.d.ts
. Or you should be able to import the types and use them from inside your codebase.
/// <reference types="oatmilk" />
import { IRoute } from 'oatmilk'
export const routes: IRoute[] = [
{
name: 'home',
path: '/',
view: () => <p>The world never says hello back..</p>,
},
]
And that should be it!