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

0.8.4 • Public • Published

Installation

npm install --save @types/insight

Summary

This package contains type definitions for insight (https://github.com/yeoman/insight).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/insight.

index.d.ts

declare namespace insight {
    interface IPackage {
        name: string;
        version: string;
    }

    interface IOptions {
        trackingCode: string;
        trackingProvider?: string | undefined;
        pkg?: IPackage | undefined;
        packageName?: string | undefined;
        packageVersion?: string | undefined;
        config?: IConfigstore | undefined;
    }

    interface IConfigstore {
        path: string;
        all: any;
        get(key: string): any;
        set(key: string, val: any): void;
        del(key: string): void;
    }

    interface IEvent {
        category: string;
        action: string;
        label?: string | undefined;
        value?: number | string | undefined;
    }
}

import IPackage = insight.IPackage;
import IOptions = insight.IOptions;
import IConfigstore = insight.IConfigstore;
import IEvent = insight.IEvent;

declare class Insight {
    trackingCode: string;
    trackingProvider: string;
    packageName: string;
    packageVersion: string;
    os: string;
    nodeVersion: string;
    appVersion: string;
    config: IConfigstore;

    optOut: boolean;
    clientId: string;

    constructor(options: IOptions);

    track(...args: string[]): void;
    trackEvent(event: IEvent): void;

    askPermission(msg?: string, cb?: Function): void;
}

export = Insight;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by vvakame.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/insight

      Weekly Downloads

      379

      Version

      0.8.4

      License

      MIT

      Unpacked Size

      5.16 kB

      Total Files

      5

      Last publish

      Collaborators

      • types