Best to be reviewed with "Hide whitespace".
### Why?
The props marked `(): any` bypassed the warning for non-serializable
props.
```tsx
'use client'
export function Comp({ onClick }: { onClick(): any }) {
// ...
}
```
Added tests to prevent regression.
---------
Co-authored-by: Janka Uryga <[email protected]>
### Why?
This PR initiates the migration of manual testing of the Next.js TypeScript plugin to an automated language service plugin test. It replaced the existing metadata `missing-type-warning` fixture with the `warn-no-type` test (naming for consistency, such as future `error-on-client`).
### Testing Plan
This PR adds the tests and fixtures for the metadata plugin to **warn when no type is provided** for metadata config exports (`metadata` and `generateMetadata`).
1. The fixtures are tested into two categories: 1) "**has type**": expects no warning, and 2) "**no type**": expects a warning.
2. For "has type", the types are from `next` or custom.
3. Each section consists of inline exports and separate exports (`export { ... }`).
4. For the fixtures of `generateMetadata`, it is divided into a function, an arrow function, and a function expression divided with sync and async.
<details><summary>Structure Details</summary>
<p>
#### `metadata`
```
.
├── has-type/
│ ├── export-inline/
│ │ ├── from-next
│ │ └── from-others
│ └── export-separate/
│ ├── from-next
│ └── from-others
└── no-type/
├── export-inline
└── export-separate
```
#### `gerenateMetadata`
```
.
├── has-type/
│ ├── export-inline/
│ │ ├── from-next/
│ │ │ ├── async/
│ │ │ │ ├── arrow-function
│ │ │ │ ├── function-declaration
│ │ │ │ └── function-expression
│ │ │ └── sync/
│ │ │ ├── arrow-function
│ │ │ ├── function-declaration
│ │ │ └── function-expression
│ │ └── from-others/
│ │ ├── async/
│ │ │ └── ...
│ │ └── sync/
│ │ └── ...
│ └── export-separate/
│ ├── from-next/
│ │ ├── async/
│ │ │ └── ...
│ │ └── sync/
│ │ └── ...
│ └── from-others/
│ ├── async/
│ │ └── ...
│ └── sync/
│ └── ...
└── no-type/
├── export-inline/
│ ├── async/
│ │ └── ...
│ └── sync/
│ └── ...
└── export-separate/
├── async/
│ └── ...
└── sync/
└── ...
```
</p>
</details>
### Follow Up
The metadata currently has one more feature: an error when using metadata exports within Client Components.
The TypeScript error `Props must be serializable for components in the
"use client" entry file, "reset" is invalid.` for the `reset` prop in
`error.tsx` and `global-error.tsx` was fixed in #46898 and #48756,
respectively. However, a regression of the fix was accidentally
introduced in #67211.
This PR restores the previous behavior and adds fixtures for manual
testing. (Since the Next.js TS plugin only applies to VSCode, manual
testing in VSCode is required. See
[`test/development/typescript-plugin/README.md`](https://github.com/vercel/next.js/blob/a5f30e68f8d1fe614965abc5df0234a869c6db8a/test/development/typescript-plugin/README.md)
for details.)