@types/passport-lastfm
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Installation

npm install --save @types/passport-lastfm

Summary

This package contains type definitions for passport-lastfm (https://github.com/kizzlebot/passport-lastfm#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-lastfm.

index.d.ts

import type { Request } from "express";

declare class Strategy {
    constructor(options: Strategy.StrategyOptions, verify: Strategy.VerifyFunction);

    name: string;
    authenticate(req: Request, options?: object): void;
    static Strategy: { new(options: Strategy.StrategyOptions, verify: Strategy.VerifyFunction): Strategy };
}

declare namespace Strategy {
    interface Profile {
        name: string;
        key: string;
        subscriber: number;
    }

    type VerifyCallback = (error?: Error | null, user?: object) => void;

    interface StrategyOptions {
        api_key?: string;
        clientID?: string;
        secret?: string;
        clientSecret?: string;
        callback_url?: string;
        callbackURL?: string;
    }

    type VerifyFunction = (
        req: Request,
        sessionKey: Profile,
        done: VerifyCallback,
    ) => void;
}

export = Strategy;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/express

Credits

These definitions were written by anyo.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/passport-lastfm

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

4.45 kB

Total Files

5

Last publish

Collaborators

  • types