Skip to content

Commit

Permalink
Fix async generateMetadata type in ts plugin (#46596)
Browse files Browse the repository at this point in the history
Corrects async return type for `generateMetadata`

x-ref: https://github.com/vercel/next.js/pull/45723/files#r1121140364

## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
  • Loading branch information
ijjk authored Mar 1, 2023
1 parent ff69947 commit 9fdddb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/server/typescript/rules/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '../utils'

const TYPE_ANOTATION = ': Metadata'
const TYPE_ANOTATION_ASYNC = ': Promise<Metadata> | Metadata'
const TYPE_ANOTATION_ASYNC = ': Promise<Metadata>'
const TYPE_IMPORT = `\n\nimport type { Metadata } from 'next'`

// Find the `export const metadata = ...` node.
Expand Down

0 comments on commit 9fdddb3

Please sign in to comment.