Skip to content

Commit

Permalink
refactor: move timeDifference key to State type (#200)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
copperwall authored Oct 22, 2020
1 parent 90bc639 commit b62e763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b62e763

Please sign in to comment.