39 lines
809 B
TypeScript
39 lines
809 B
TypeScript
export interface IMatrixProps {
|
|
inputs: Array<Input>,
|
|
outputs: Array<Output>,
|
|
deviceName: string,
|
|
}
|
|
|
|
export interface Input {
|
|
inputNumber: string,
|
|
inputDevice: string,
|
|
}
|
|
|
|
export interface Output {
|
|
outputLetter: string,
|
|
outputDevice: string,
|
|
}
|
|
|
|
export class Matrix {
|
|
private _inputs: Array<Input> = [];
|
|
private _outputs: Array<Output> = [];
|
|
private _deviceName: string;
|
|
|
|
constructor(props: IMatrixProps) {
|
|
this._inputs = props.inputs;
|
|
this._outputs = props.outputs;
|
|
this._deviceName = props.deviceName;
|
|
}
|
|
|
|
public get inputs(): Array<Input> {
|
|
return this._inputs
|
|
}
|
|
|
|
public get outputs(): Array<Output> {
|
|
return this._outputs;
|
|
}
|
|
|
|
public get deviceName(): string {
|
|
return this._deviceName;
|
|
}
|
|
} |