Note: You are viewing the new Next.js documentation. The old docs are still available here.

TypeScript

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.