tsd
November 22, 2019 · View on GitHub
SlimIO TypeScript definition. This project contains definitions that are useful across many internal projects (his saves us from having to recreate the definitions multiple times).
Requirements
- Node.js v12 or higher
Getting Started
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i @slimio/tsd -D
⚠️ -D stand for DevDependencies.
Usage example
To be able to use the SlimIO namespace, include a Triple-Slash Directives at the top of your main project d.ts file.
/// <reference types="@slimio/tsd" />
You will now be able to use the namespace within your project
declare function getAlarm(cid: SlimIO.CID, severity?: SlimIO.AlarmSeverity): SlimIO.RawAlarm;
API
Members of SlimIO Namespace.
interfaces
SlimIO.RawEntity
interface RawEntity {
name: string;
description: string;
descriptors?: {
[key: string]: string;
};
parent?: number;
}
SlimIO.RawIdentityCard
interface RawIdentityCard {
unit: string;
entityId: number;
description?: string;
max?: number;
interval?: number;
}
SlimIO.RawAlarm
interface RawAlarm {
message: string;
entityId: number;
correlateKey: string;
severity: number;
}
enum
SlimIO.AlarmSeverity
enum AlarmSeverity {
Critical,
Major,
Minor
}
types
SlimIO.CID
type CID = string | null;
SlimIO.CK
type CK = string | null;
Dependencies
This project have no dependencies.
License
MIT