Skip to content

Commit

Permalink
chore(types): Mark public interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jnv committed Jan 2, 2023
1 parent ef1965d commit 11cfec4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/models/profile.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import * as passport from 'passport';

/**
* @public
*/
export interface Profile extends passport.Profile {
username: string;
profileUrl: string;
}

/**
* @public
*/
export interface ProfileWithMetaData extends Profile {
_raw: string | Buffer | undefined;
_json: unknown;
Expand Down
9 changes: 9 additions & 0 deletions src/models/strategyOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ interface TwitterStrategyOptionsBase {
tokenURL?: string | undefined;
}

/**
* @public
*/
export interface StrategyOptions
extends TwitterStrategyOptionsBase,
Omit<PassportOAuth2StrategyOptions, 'authorizationURL' | 'tokenURL'> {
passReqToCallback?: false | undefined;
}

/**
* @public
*/
export interface StrategyOptionWithRequest
extends TwitterStrategyOptionsBase,
Omit<
Expand All @@ -27,6 +33,9 @@ export interface StrategyOptionWithRequest
passReqToCallback: true;
}

/**
* @public
*/
export interface AuthenticateOptions {
scope?: string[] | string | undefined;
state?: unknown | undefined;
Expand Down
3 changes: 3 additions & 0 deletions src/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { StrategyOptions } from './models/strategyOptions';
import { TwitterError } from './models/twitterError';
import { TwitterUserInfoResponse } from './models/twitterUserInfo';

/**
* @public
*/
export class Strategy extends OAuth2Strategy {
_userProfileURL: string;

Expand Down

0 comments on commit 11cfec4

Please sign in to comment.