TypeScript Next.js Cheat Sheet
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. This is a list of TypeScript types for Next.js generated from the declaration files in https://github.com/zeit/next.js/tree/v10.2.0.
See also my TypeScript React cheat sheet and TypeScript cheat sheet.
Contents
External Links
- Built-ins
- DOM
- ES5, ES2015-ES2020, ESNext
- Node.js
- Script Host
- Web Worker
- axios
- date-fns
- expo
- immer
- react
- react-apollo
- react-beautiful-dnd
- react-dnd
- react-dom
- react-dom/server
- react-dom/test-utils
- react-native
- react-navigation
- react-redux
- react-relay
- react-router-dom
- react-select
- react-spring
- react-window
- reactstrap
- recoil
- redux
- relay-runtime
- styled-components
next
- default ‹ next ‹ default ‹ createServer (function)
- GetServerSideProps<P, Q extends ParsedUrlQuery> (type)
- GetServerSidePropsContext<Q extends ParsedUrlQuery> (type)
- GetServerSidePropsResult<P> (type)
- GetStaticPaths<P extends ParsedUrlQuery> (type)
- GetStaticPathsContext (type)
- GetStaticPathsResult<P extends ParsedUrlQuery> (type)
- GetStaticProps<P, Q extends ParsedUrlQuery> (type)
- GetStaticPropsContext<Q extends ParsedUrlQuery> (type)
- GetStaticPropsResult<P> (type)
- InferGetServerSidePropsType<T> (type)
- InferGetStaticPropsType<T> (type)
- NextApiHandler ‹ NextApiHandler ‹ NextApiHandler<T> (type)
- NextApiRequest ‹ NextApiRequest ‹ NextApiRequest (interface)
- NextApiResponse ‹ NextApiResponse ‹ NextApiResponse<T> (type)
- NextComponentType ‹ NextComponentType ‹ NextComponentType<C extends BaseContext, IP, P> (type)
- NextPage<P, IP> (type)
- NextPageContext ‹ NextPageContext ‹ NextPageContext (interface)
- PageConfig (type)
- PreviewData (type)
- react (module)
- HtmlHTMLAttributes<T> (interface)
- LinkHTMLAttributes<T> (interface)
- StyleHTMLAttributes<T> (interface)
- Redirect (type)
next/amp
- * from "./dist/next-server/lib/amp"
- isInAmpMode (function)
- useAmp (function)
next/app
- * from "./dist/pages/_app"
- AppContext (type)
- AppInitialProps ‹ AppInitialProps ‹ AppInitialProps (type)
- AppProps<P> (type)
- Container (function)
- createUrl (function)
- NextWebVitalsMetric ‹ NextWebVitalsMetric ‹ NextWebVitalsMetric (type)
- default ‹ default ‹ App (class)
next/client
- * from "./dist/client/index"
- __webpack_public_path__ (var)
- emitter (var)
- global (module)
- Window (interface)
- render (function)
- renderError (function)
- router (var)
- version (var)
- default ‹ default ‹ [anonymous] (function)
next/config
- * from "./dist/next-server/lib/runtime-config"
- setConfig (function)
- default ‹ default ‹ [anonymous] (function)
next/constants
- * from "./dist/next-server/lib/constants"
- AMP_RENDER_TARGET (var)
- BLOCKED_PAGES (var)
- BUILD_ID_FILE (var)
- BUILD_MANIFEST (var)
- CLIENT_PUBLIC_FILES_PATH (var)
- CLIENT_STATIC_FILES_PATH (var)
- CLIENT_STATIC_FILES_RUNTIME (var)
- CLIENT_STATIC_FILES_RUNTIME_AMP (var)
- CLIENT_STATIC_FILES_RUNTIME_MAIN (var)
- CLIENT_STATIC_FILES_RUNTIME_POLYFILLS (var)
- CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH (var)
- CLIENT_STATIC_FILES_RUNTIME_WEBPACK (var)
- CONFIG_FILE (var)
- DEV_CLIENT_PAGES_MANIFEST (var)
- EXPORT_DETAIL (var)
- EXPORT_MARKER (var)
- FONT_MANIFEST (var)
- IMAGES_MANIFEST (var)
- OPTIMIZED_FONT_PROVIDERS (var)
- PAGES_MANIFEST (var)
- PERMANENT_REDIRECT_STATUS (var)
- PHASE_DEVELOPMENT_SERVER (var)
- PHASE_EXPORT (var)
- PHASE_PRODUCTION_BUILD (var)
- PHASE_PRODUCTION_SERVER (var)
- PRERENDER_MANIFEST (var)
- REACT_LOADABLE_MANIFEST (var)
- ROUTES_MANIFEST (var)
- SERVER_DIRECTORY (var)
- SERVER_FILES_MANIFEST (var)
- SERVER_PROPS_ID (var)
- SERVERLESS_DIRECTORY (var)
- STATIC_PROPS_ID (var)
- STATIC_STATUS_PAGES (var)
- STRING_LITERAL_DROP_BUNDLE (var)
- TEMPORARY_REDIRECT_STATUS (var)
next/document
- * from "./dist/pages/_document"
- DocumentContext ‹ DocumentContext ‹ DocumentContext (type)
- DocumentInitialProps ‹ DocumentInitialProps ‹ DocumentInitialProps (type)
- DocumentProps ‹ DocumentProps ‹ DocumentProps (type)
- Head (class)
- Html (function)
- Main (function)
- NextScript (class)
- OriginProps (type)
- default ‹ default ‹ Document (class)
next/dynamic
- * from "./dist/next-server/lib/dynamic"
- DynamicOptions<P> (type)
- LoadableBaseOptions<P> (type)
- LoadableComponent<P> (type)
- LoadableFn<P> (type)
- LoadableGeneratedOptions (type)
- LoadableOptions<P> (type)
- Loader<P> (type)
- LoaderComponent<P> (type)
- LoaderMap (type)
- noSSR (function)
- default ‹ default ‹ dynamic (function)
next/error
- * from "./dist/pages/_error"
- ErrorProps (type)
- default ‹ default ‹ Error (class)
next/head
- * from "./dist/next-server/lib/head"
- defaultHead (function)
- default ‹ default ‹ Head (function)
next/image
- * from "./dist/client/image"
- ImageLoader (type)
- ImageLoaderProps (type)
- ImageProps (type)
- default ‹ default ‹ Image (function)
next/link
- * from "./dist/client/link"
- LinkProps (type)
- default ‹ default ‹ Link (function)
next/router
- * from "./dist/client/router"
- createRouter (var)
- makePublicRouterInstance (function)
- NextRouter ‹ NextRouter ‹ NextRouter (type)
- Router ‹ Router ‹ default ‹ Router (class)
- SingletonRouter (type)
- useRouter (function)
- withRouter ‹ default ‹ withRouter (function)
- default ‹ default ‹ singletonRouter (var)