Deploy Next.js on the platform it was made for →
Deploy Next.js in seconds →
AMP currently doesn't have built-in types for TypeScript, but it's in their roadmap (#13791).
As a workaround you can manually create a file called amp.d.ts inside your project and add the custom types described here.
amp.d.ts