From 8e39ae145dc9b054a1cfbad7172a469c2f317d63 Mon Sep 17 00:00:00 2001 From: Will Harney Date: Thu, 9 Jan 2025 10:28:11 -0500 Subject: [PATCH] chore: use isolated modules --- lib/cookie/index.ts | 25 ++++++++++++++++--------- tsconfig.json | 3 ++- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/lib/cookie/index.ts b/lib/cookie/index.ts index d6245054..a06d3c4a 100644 --- a/lib/cookie/index.ts +++ b/lib/cookie/index.ts @@ -1,24 +1,31 @@ -export { MemoryCookieStore, MemoryCookieStoreIndex } from '../memstore' +export { MemoryCookieStore, type MemoryCookieStoreIndex } from '../memstore' export { pathMatch } from '../pathMatch' export { permuteDomain } from '../permuteDomain' -export { getPublicSuffix, GetPublicSuffixOptions } from '../getPublicSuffix' +export { + getPublicSuffix, + type GetPublicSuffixOptions, +} from '../getPublicSuffix' export { Store } from '../store' export { ParameterError } from '../validators' export { version } from '../version' -export { Callback, ErrorCallback, Nullable } from '../utils' +export { type Callback, type ErrorCallback, type Nullable } from '../utils' export { canonicalDomain } from './canonicalDomain' export { PrefixSecurityEnum, - SerializedCookie, - SerializedCookieJar, + type SerializedCookie, + type SerializedCookieJar, } from './constants' -export { Cookie, CreateCookieOptions, ParseCookieOptions } from './cookie' +export { + Cookie, + type CreateCookieOptions, + type ParseCookieOptions, +} from './cookie' export { cookieCompare } from './cookieCompare' export { CookieJar, - CreateCookieJarOptions, - GetCookiesOptions, - SetCookieOptions, + type CreateCookieJarOptions, + type GetCookiesOptions, + type SetCookieOptions, } from './cookieJar' export { defaultPath } from './defaultPath' export { domainMatch } from './domainMatch' diff --git a/tsconfig.json b/tsconfig.json index b090ae11..af6a13f0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,7 +26,8 @@ "allowUnusedLabels": false, "allowUnreachableCode": false, /* Compatibility */ - "ignoreDeprecations": "5.0" + "ignoreDeprecations": "5.0", + "isolatedModules": true }, "include": ["lib"], "exclude": ["jest.config.ts"]