From b62e7631c5c143099e5abbf00516dd0bbb0e03f3 Mon Sep 17 00:00:00 2001 From: Chris Opperwall Date: Thu, 22 Oct 2020 11:11:55 -0700 Subject: [PATCH] refactor: move timeDifference key to State type (#200) This moves the `timeDifference` key from `StrategyOptions` to the`State` type. This is because `timeDifference` is only used internally in the state object and not passed in by the user in the options parameter to auth-app. The types were not failing previously because the `State` type extends the `StrategyOptions` type. However, `State` is the correct place for this key to live. --- src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types.ts b/src/types.ts index 70936054b..99ca9a305 100644 --- a/src/types.ts +++ b/src/types.ts @@ -81,7 +81,6 @@ export type StrategyOptions = { clientSecret?: string; request?: OctokitTypes.RequestInterface; cache?: Cache; - timeDifference?: number; log?: { warn: (message: string, additionalInfo?: object) => any; [key: string]: any; @@ -125,6 +124,7 @@ export type State = StrategyOptions & { installationId?: number; request: OctokitTypes.RequestInterface; cache: Cache; + timeDifference?: number; log: { warn: (message: string, additionalInfo?: object) => any; [key: string]: any;