Skip to content

Commit bc5e65f

Browse files
committed
refactor(cookie): improve type annotations for document and headers
1 parent d176f9c commit bc5e65f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

projects/ngx-cookie-service-ssr/src/lib/ssr-cookie.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export class SsrCookieService {
270270
}
271271

272272
// Handle direct headers object access
273-
const headers = this.request.headers as any;
273+
const headers = this.request.headers;
274274
if (headers && typeof headers === 'object') {
275275
return headers['cookie'] || headers['Cookie'];
276276
}

projects/ngx-cookie-service/src/lib/cookie.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class CookieService {
110110
}
111111

112112
const cookies: Record<string, string> = {};
113-
const document: any = this.document;
113+
const document: Document = this.document;
114114

115115
if (document.cookie && document.cookie !== '') {
116116
document.cookie.split(';').forEach((currentCookie: string) => {

0 commit comments

Comments
 (0)