File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
packages/next/src/server/typescript/rules Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -160,18 +160,25 @@ const metadata = {
160160 const diagnostics : tsModule . Diagnostic [ ] = [ ]
161161
162162 const exportClause = node . exportClause
163- if ( exportClause && ts . isNamedExports ( exportClause ) ) {
163+ if ( ! node . isTypeOnly && exportClause && ts . isNamedExports ( exportClause ) ) {
164164 for ( const e of exportClause . elements ) {
165+ if ( e . isTypeOnly ) {
166+ continue
167+ }
165168 const exportName = e . name . getText ( )
166169 if ( exportName !== 'metadata' && exportName !== 'generateMetadata' ) {
167170 continue
168171 }
169172
170173 const symbol = typeChecker . getSymbolAtLocation ( e . name )
171- if ( ! symbol ) continue
174+ if ( ! symbol ) {
175+ continue
176+ }
172177
173178 const originalSymbol = typeChecker . getAliasedSymbol ( symbol )
174- if ( ! originalSymbol ) continue
179+ if ( ! originalSymbol ) {
180+ continue
181+ }
175182
176183 const declarations = originalSymbol . getDeclarations ( )
177184 if ( ! declarations ) {
You can’t perform that action at this time.
0 commit comments