Skip to content

Commit f3cb901

Browse files
committed
chore: enforce common pkgs as well
1 parent 6fafb03 commit f3cb901

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

clients/algoliasearch-client-javascript/packages/logger-console/src/logger.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ import { LogLevelEnum } from '@algolia/client-common';
33

44
export function createConsoleLogger(logLevel: LogLevelType): Logger {
55
return {
6-
debug(message: string, args?: any): Readonly<Promise<void>> {
6+
debug(message: string, args?: any | undefined): Readonly<Promise<void>> {
77
if (LogLevelEnum.Debug >= logLevel) {
88
console.debug(message, args);
99
}
1010

1111
return Promise.resolve();
1212
},
1313

14-
info(message: string, args?: any): Readonly<Promise<void>> {
14+
info(message: string, args?: any | undefined): Readonly<Promise<void>> {
1515
if (LogLevelEnum.Info >= logLevel) {
1616
console.info(message, args);
1717
}
1818

1919
return Promise.resolve();
2020
},
2121

22-
error(message: string, args?: any): Readonly<Promise<void>> {
22+
error(message: string, args?: any | undefined): Readonly<Promise<void>> {
2323
console.error(message, args);
2424

2525
return Promise.resolve();

clients/algoliasearch-client-javascript/packages/requester-fetch/src/createFetchRequester.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function getErrorMessage(error: unknown, abortContent: string): string {
1212
}
1313

1414
export type FetchRequesterOptions = {
15-
readonly requesterOptions?: RequestInit;
15+
readonly requesterOptions?: RequestInit | undefined;
1616
};
1717

1818
export function createFetchRequester({ requesterOptions = {} }: FetchRequesterOptions = {}): Requester {

clients/algoliasearch-client-javascript/packages/requester-testing/src/createEchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export type EchoResponse = Omit<EndRequest, 'data'> &
44
Pick<Request, 'data' | 'path'> & {
55
host: string;
66
algoliaAgent: string;
7-
searchParams?: Record<string, string>;
7+
searchParams?: Record<string, string> | undefined;
88
};
99

1010
type BasicURL = {
@@ -15,7 +15,7 @@ type BasicURL = {
1515

1616
export type EchoRequesterParams = {
1717
getURL: (url: string) => BasicURL;
18-
status?: number;
18+
status?: number | undefined;
1919
};
2020

2121
function getUrlParams({

clients/algoliasearch-client-javascript/tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
{
22
"compilerOptions": {
33
"allowJs": false,
4-
"verbatimModuleSyntax": true,
54
"allowSyntheticDefaultImports": true,
65
"declaration": true,
76
"esModuleInterop": true,
7+
"exactOptionalPropertyTypes": true,
88
"lib": ["dom", "esnext", "dom.iterable", "scripthost"],
99
"module": "esnext",
1010
"moduleResolution": "node",
1111
"noImplicitAny": true,
12-
"noImplicitThis": true,
1312
"noImplicitOverride": true,
13+
"noImplicitThis": true,
1414
"noLib": false,
1515
"noUnusedLocals": true,
1616
"outDir": "dist",
1717
"removeComments": false,
1818
"sourceMap": true,
1919
"strict": true,
2020
"target": "esnext",
21-
"types": ["node"]
21+
"types": ["node"],
22+
"verbatimModuleSyntax": true
2223
},
2324
"include": ["packages/**/*.ts"],
2425
"exclude": ["dist", "node_modules"]

templates/javascript/clients/tsconfig.mustache

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
{{#isAlgoliasearchClient}}
55
"types": ["node", "@cloudflare/workers-types", "@cloudflare/vitest-pool-workers", "vitest/globals"],
66
{{/isAlgoliasearchClient}}
7-
"outDir": "dist",
8-
"exactOptionalPropertyTypes": true
7+
"outDir": "dist"
98
},
109
"include": ["{{apiPackage}}", "model", "builds"],
1110
"exclude": ["dist", "node_modules"]

0 commit comments

Comments
 (0)