Module NextJS
Provides classes and predicates modeling Next.js.
Import path
import javascriptPredicates
| apiFolder | Gets a folder that contains API endpoints for a Next.js application. These API endpoints act as Express-like route-handlers. It matches both the Pages Router ( |
| getAModuleWithFallbackPaths | Gets a module inside a “pages” folder where |
| getANextPackage | Gets a |
| getAPagesFolder | Gets a “pages” folder in a |
| getAPagesModule | Gets a module corrosponding to a |
| getAPropsSource | Gets a reference to a |
| getInitialProps | Gets the |
| getServerSidePropsFunction | Gets the |
| getStaticPropsFunction | Gets the |
| nextRouter | Gets a reference to a Next.js router. |
Classes
| NextApiRouteHandler | A Next.js route handler for an API endpoint. The response (res) includes a set of Express.js-like methods, and we therefore model the routehandler as an Express.js routehandler. |
| NextAppRequestSource | A source of user-controlled data from a |
| NextAppRouteHandler | A route handler for Next.js 13+ App Router API endpoints, which are defined by exporting HTTP method functions (like |
| NextHttpRequestSource | A NodeJS HTTP request object in a Next.js page. |
| NextHttpResponseSource | A NodeJS HTTP response object in a Next.js page. |
| NextHttpRouteHandler | A Next.js function that is exected on the server for every request, seen as a routehandler. |
| NextJSStaticPropsStep | A step modeling the flow from the server-computed props object to the default exported function that renders the page. |
| NextJSStaticReactComponentPropsStep | A step modeling the flow from the server-computed props object to the default exported React component that renders the page. |
| NextParams | A user defined path or query parameter in |
| NextReqResHandler | A function that handles both a request and response from Next.js, seen as a routehandler. |