1.1.3 • Published 6 months ago

types-p42-flow v1.1.3

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

Parallel42 Flow Typescript definitions

(Incomplete) type definitions for Parallel42s Flow. Currently implements the default functions and APIs apart from:

  • Departure/Arrival commonLegs
  • Approach icaos
  • Airport metar
  • Weather metar layers, phenomena, vis
  • A couple of params in the default APIs, such as error for the find_metar_from_coords
  • The Twitch functions and interfaces are guessed from the Flow documentation, I don't have the ability to verify these
  • Probably something else, Issues/PRs welcome

Installation

Install types-p42-flow and add it to your include in tsconfig.json.

npm install -D types-p42-flow

This would be a good starting point:

{
  "compilerOptions": {
    "target": "es2016",
    "module": "amd",
    "outFile": "./code.js",
    "removeComments": true,
    "newLine": "lf",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "noImplicitThis": false
  },
  "include": [
    "node_modules/types-p42-flow",
    "**/*.ts"
  ]
}

Using the above, compile using npx tsc to generate a code.js file.

Datastore

The variable this.store is defined as a Record<string, unknown>. If you want type support for your datastore vars, you can override this using the Store interface:

declare module global {
    interface Store {
        active: boolean,
        another_prop: boolean
    }
}
this.store = {
  active: false,
  another_prop: false
}

Sim settings

Included in the repo are Enums for the different Select-type settings values. These are essentially human readable replacements for the index parameter.

1.1.3

6 months ago

1.1.2

6 months ago

1.1.1

9 months ago

1.1.0

10 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago