1.3.5 • Published 6 months ago

@types/system-service v1.3.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for system-service 1.3
// Project: https://github.com/leocwlam/system-service
// Definitions by: Leo Lam <https://github.com/leocwlam>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.1

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

export { Logger, level as Level, fileRotateType as FileRotateType, LoggerConfiguration, FileConfiguration, 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.

1.3.5

6 months ago

1.3.4

7 months ago

1.3.3

8 months ago

1.3.2

3 years ago

1.3.1

4 years ago

1.3.0

4 years ago