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

1.3.5 • Public • Published

Installation

npm install --save @types/system-service

Summary

This package contains type definitions for system-service (https://github.com/leocwlam/system-service).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/system-service.

index.d.ts

import { FileConfiguration, Logger, LoggerConfiguration, SourcesConfiguration } from "system-logger";

export {
    FileConfiguration,
    fileRotateType as FileRotateType,
    level as Level,
    Logger,
    LoggerConfiguration,
    SourcesConfiguration,
} from "system-logger";

export interface ServiceConfiguration {
    log: {
        config: LoggerConfiguration;
        file?: {
            source?: FileConfiguration | undefined;
        } | undefined;
        source?: {
            source?: SourcesConfiguration | undefined;
        } | undefined;
    };
}

export class MessageConsumer {
    logger: Logger;

    constructor();
    service(): void;
    setup(systemService: SystemService): void;
    cleanup(): void;
    create(): void;
    validate(message: any): void;
    process(message: any): void;
    start(): void;
    stop(): void;
}

export class SystemService {
    config: ServiceConfiguration;
    messageConsumer: MessageConsumer;
    logger: Logger;

    constructor(config?: ServiceConfiguration, messageConsumer?: MessageConsumer);
    validateMessage(message: any): void;
    processMessage(message: any): void;
    start(): void;
    stop(): void;
}

Additional Details

Credits

These definitions were written by Leo Lam.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/system-service

Weekly Downloads

1

Version

1.3.5

License

MIT

Unpacked Size

5.04 kB

Total Files

5

Last publish

Collaborators

  • types