mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
14 lines
291 B
TypeScript
14 lines
291 B
TypeScript
import { cookies, headers, type UnsafeUnwrappedHeaders } from 'next/headers';
|
|
|
|
export function myFun() {
|
|
return async function () {
|
|
(await cookies()).get('name')
|
|
};
|
|
}
|
|
|
|
export function myFun2() {
|
|
return function () {
|
|
void (headers() as unknown as UnsafeUnwrappedHeaders)
|
|
};
|
|
}
|