Skip to content

Commit

Permalink
style(typescript): any vs unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Sep 23, 2019
1 parent a930355 commit 10d9fb1
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface HttpRequestOptions extends tls.SecureContextOptions {
https: https.Agent,
};

[key: string]: unknown;
[key: string]: any;
}

export interface AnyClientMetadata {
Expand Down Expand Up @@ -123,7 +123,7 @@ export interface AnyClientMetadata {
web_message_uris?: string[];
tls_client_certificate_bound_access_tokens?: boolean;

[key: string]: unknown;
[key: string]: any;
}

export interface ClientMetadata extends AnyClientMetadata {
Expand All @@ -141,7 +141,7 @@ export interface ClaimsParameterMember {
value?: string;
values?: string[];

[key: string]: unknown;
[key: string]: any;
}

export interface ClaimsParameter {
Expand Down Expand Up @@ -273,15 +273,15 @@ interface BaseModel {
}

declare class BaseModel {
get adapter(): Adapter;
readonly adapter: Adapter;

save(ttl?: number): Promise<string>;
destroy(): Promise<void>;
emit(eventName: string): void;

static get adapter(): Adapter;
static readonly adapter: Adapter;

static get IN_PAYLOAD(): string[];
static IN_PAYLOAD: string[];

static find<T>(
this: { new (...args: any[]): T },
Expand Down Expand Up @@ -348,7 +348,7 @@ declare class RefreshToken extends BaseToken {
'jkt#S256'?: string;
grantId: string;
gty: string;
[key: string]: unknown;
[key: string]: any;
});
readonly kind: 'RefreshToken';
rotations?: number;
Expand Down Expand Up @@ -396,7 +396,7 @@ declare class AuthorizationCode extends BaseToken {
'jkt#S256'?: string;
grantId: string;
gty: string;
[key: string]: unknown;
[key: string]: any;
});
readonly kind: 'AuthorizationCode';
redirectUri?: string;
Expand Down Expand Up @@ -428,7 +428,7 @@ declare class DeviceCode extends BaseToken {
grantId: string;
client: Client;
deviceInfo: AnyObject;
[key: string]: unknown;
[key: string]: any;
});
readonly kind: 'DeviceCode';
error?: string;
Expand Down Expand Up @@ -462,7 +462,7 @@ declare class ClientCredentials extends BaseToken {
client: Client;
resource?: string | string[];
scope: string;
[key: string]: unknown;
[key: string]: any;
});
readonly kind: 'ClientCredentials';
scope?: string;
Expand All @@ -480,7 +480,7 @@ declare class InitialAccessToken extends BaseToken {
constructor(properties?: {
expiresIn?: number;
policies?: string[];
[key: string]: unknown;
[key: string]: any;
});
readonly kind: 'InitialAccessToken';
clientId: undefined;
Expand All @@ -506,7 +506,7 @@ declare class AccessToken extends BaseToken {
'jkt#S256'?: string;
grantId: string;
gty: string;
[key: string]: unknown;
[key: string]: any;
});
readonly kind: 'AccessToken';
accountId: string;
Expand Down Expand Up @@ -627,7 +627,7 @@ declare class Client {
readonly webMessageUris?: string[];
readonly tlsClientCertificateBoundAccessTokens?: boolean;

[key: string]: unknown;
[key: string]: any;

static find(id: string): Promise<Client | undefined>;
}
Expand All @@ -649,7 +649,7 @@ declare class OIDCContext {
readonly PushedAuthorizationRequest?: PushedAuthorizationRequest;
readonly RotatedRefreshToken?: RefreshToken;
readonly RotatedRegistrationAccessToken?: RegistrationAccessToken;
readonly [key: string]: unknown;
readonly [key: string]: any;
};
readonly claims: ClaimsParameter;
readonly issuer: string;
Expand Down Expand Up @@ -695,7 +695,7 @@ export type TLSClientAuthProperty = 'tls_client_auth_subject_dn' | 'tls_client_a
export interface AccountClaims {
sub: string;

[key: string]: unknown;
[key: string]: any;
}

export interface Account {
Expand Down Expand Up @@ -1060,7 +1060,7 @@ export interface InteractionResults {

meta?: AnyObject;

[key: string]: unknown;
[key: string]: any;
}

export class Provider extends events.EventEmitter {
Expand Down

0 comments on commit 10d9fb1

Please sign in to comment.