[node] begin the great typescript rewrite
This commit is contained in:
parent
3b61a9694d
commit
d668eac4a6
31 changed files with 879 additions and 666 deletions
56
nodejs/model/ship.ts
Normal file
56
nodejs/model/ship.ts
Normal file
|
@ -0,0 +1,56 @@
|
|||
import { Cargo } from './cargo.ts';
|
||||
|
||||
export type Cooldown = {
|
||||
shipSymbol: string;
|
||||
totalSeconds: number;
|
||||
remainingSeconds: number;
|
||||
};
|
||||
|
||||
export type Consummed = {
|
||||
amount: number;
|
||||
timestamp: Date;
|
||||
};
|
||||
|
||||
export type Fuel = {
|
||||
capacity: number;
|
||||
consummed: Consummed;
|
||||
current: number;
|
||||
};
|
||||
|
||||
export type Nav = {
|
||||
flightMode: string;
|
||||
route: Route;
|
||||
status: string;
|
||||
systemSymbol: string;
|
||||
waypointSymbol: string;
|
||||
};
|
||||
|
||||
export type Route = {
|
||||
arrival: Date;
|
||||
departureTime: Date;
|
||||
destination: RouteEndpoint;
|
||||
origin: RouteEndpoint;
|
||||
};
|
||||
|
||||
export type RouteEndpoint = {
|
||||
type: string;
|
||||
symbol: string;
|
||||
systemSymbol: string;
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
|
||||
export type Ship = {
|
||||
cargo: Cargo;
|
||||
cooldown: Cooldown;
|
||||
// crew
|
||||
// engine
|
||||
// frame
|
||||
fuel: Fuel;
|
||||
// modules
|
||||
// mounts
|
||||
nav: Nav;
|
||||
// reactor
|
||||
// registration
|
||||
symbol: string;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue