diff --git a/src/components/TreeReactFlow/index.tsx b/src/components/TreeReactFlow/index.tsx index 3872fd80..7ca982b9 100644 --- a/src/components/TreeReactFlow/index.tsx +++ b/src/components/TreeReactFlow/index.tsx @@ -1415,7 +1415,7 @@ export const ReactFlowSafe = < // the tree in order to perform actions on them. elementsSelectable: false, onNodeClick: (e, n) => { - "onNodeClick" in p && + p.onNodeClick && p.onNodeClick( e, // This cast is safe because `N` is also the type of elements of the `nodes` field. diff --git a/src/primer-api/primer-api.ts b/src/primer-api/primer-api.ts index 1c16c8f4..df6848a0 100644 --- a/src/primer-api/primer-api.ts +++ b/src/primer-api/primer-api.ts @@ -118,7 +118,7 @@ export const useGetSessionListHook = () => { ) => { return getSessionList( {url: `/openapi/sessions`, method: 'GET', - params, ...(signal ? { signal }: {}) + params, signal }, ); } @@ -701,7 +701,7 @@ export const useGetSessionNameHook = () => { signal?: AbortSignal ) => { return getSessionName( - {url: `/openapi/sessions/${sessionId}/name`, method: 'GET', ...(signal ? { signal }: {}) + {url: `/openapi/sessions/${sessionId}/name`, method: 'GET', signal }, ); } @@ -827,7 +827,7 @@ export const useGetProgramHook = () => { signal?: AbortSignal ) => { return getProgram( - {url: `/openapi/sessions/${sessionId}/program`, method: 'GET', ...(signal ? { signal }: {}) + {url: `/openapi/sessions/${sessionId}/program`, method: 'GET', signal }, ); } @@ -1129,7 +1129,7 @@ export const useGetVersionHook = () => { signal?: AbortSignal ) => { return getVersion( - {url: `/openapi/version`, method: 'GET', ...(signal ? { signal }: {}) + {url: `/openapi/version`, method: 'GET', signal }, ); } diff --git a/tsconfig.base.json b/tsconfig.base.json index 5057c3e2..8be4931d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -22,7 +22,7 @@ "allowUnreachableCode": false, "allowUnusedLabels": false, "alwaysStrict": true, - "exactOptionalPropertyTypes": true, + "exactOptionalPropertyTypes": false, "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitOverride": true,